You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Josef Ender <mo...@gmx.net> on 2005/02/07 17:12:18 UTC

//scriptname gets script source on https server on Win32

Hello

I accidentally entered a wrong URL in my browser and instead of the 
script output I got the script SOURCE back!

The URL is https://my.servername.local//p_reh/myscriptname.pl

My mistake was the double / after the server name. Single / works as 
expected. I can also enter three or more / after the server name and get 
the script source back.

This happens on both my development server and the productive server.

May this be a configuration issue?

Many thanks for any hints.

Josef


System configuration:

Apache/1.3.27 (Win32) mod_ssl/2.8.14 OpenSSL/0.9.7b mod_perl/1.27_01-dev
on NT 4.0 SP6a (development)
windows 2000 (productive).

<VirtualHost 127.0.0.1:443>

DocumentRoot c:/web/ip_virtual/my.servername.local
ServerName my.servername.local
ErrorLog logs/my.servername.local.ssl.log
CustomLog logs/my.servername.local.ssl.access.log combined
SSLEngine on
SSLCipherSuite 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/Apache/conf/ssl.crt/my.servername.local.crt"

SSLCertificateKeyFile "/Apache/conf/ssl.key/my.servername.local.key"

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
     SSLOptions +StdEnvVars
</Files>
</VirtualHost>

Alias /p_reh/ "c:/web/cgi/p_reh/"
<Location /p_reh>
  SetHandler perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On
  Options +ExecCGI
</Location>


-- 
Josef Ender, Bitspot AG
http://www.bitspot.com

Re: //scriptname gets script source on https server on Win32

Posted by Brian Reichert <re...@numachi.com>.
On Mon, Feb 07, 2005 at 05:12:18PM +0100, Josef Ender wrote:
> Hello
> 
> I accidentally entered a wrong URL in my browser and instead of the 
> script output I got the script SOURCE back!
> 
> The URL is https://my.servername.local//p_reh/myscriptname.pl
> 
> My mistake was the double / after the server name. Single / works as 
> expected. I can also enter three or more / after the server name and get 
> the script source back.
> 
> This happens on both my development server and the productive server.
> 
> May this be a configuration issue?
> 
> Many thanks for any hints.

I think the issue is your Location block:

> <Location /p_reh>

no longer matches your typo'ed URL:

> The URL is https://my.servername.local//p_reh/myscriptname.pl

Here, the location is '//p_reh'.  Your handler won't be called.

Consider LocationMatch, or using mod_rewrite to correct requested URLs.

> Josef
> -- 
> Josef Ender, Bitspot AG
> http://www.bitspot.com

-- 
Brian Reichert				<re...@numachi.com>
37 Crystal Ave. #303			Daytime number: (603) 434-6842
Derry NH 03038-1713 USA			BSD admin/developer at large