modperl_httpd.conf_hints_alias_and_location

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: modperl@apache.org
From: Bill Eberle <bill.eberle@zinza.com>
Subject: Location directive not working for mod perl
Date: Tue, 26 Dec 2000 22:48:03 +0900

I hope this is the correct mailing list for newbie mod perl questions.
I have just installed mod_perl 1.24 with Apache 1.3.14.  Mod perl seems
to be running because upon startup of httpd, the Apache error log file
says

Apache/1.3.14 (Unix) mod_perl/1.24_02-dev configured -- resuming normal
operations

The problem I'm having is that the Location directive does not seem to
be working.  I have the following in my httpd.conf file:

Alias  /perl/  "/home/httpd/perl"

<Location /perl>
     SetHandler perl-script
     PerlHandler Apache::Registry
     Options +ExecCGI
     allow from all
     PerlSendHeader On
</Location>

I have placed a file called test-cgi in the directory
"/home/httpd/perl/".  It is executable and runs if executed from the
command line.  However, when I try to call this script through the
browser using the URL http://localhost/perl/test-cgi I get a 404 not
found error (The requested URL /perl/test-cgi was not found on this
server.The requested URL /perl/test-cgi was not found on this server.)

The ScriptAlias directive works fine.  I have:

ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

and the same file (test-cgi) placed in /usr/local/apache/cgi-bin
executes without problems.

This all seems very simple so I don't understand what I'm doing wrong.
Any ideas anyone?


===

To: "Bill Eberle" <bill.eberle@zinza.com>,
<modperl@apache.org>
From: "Rod Butcher" <rbutch@hyena.com.au>
Subject: Re: Location directive not working for mod perl
Date: Wed, 27 Dec 2000 02:13:54 +1100

I believe you need the trailing / 
i.e. Alias  /perl/  "/home/httpd/perl/"
(but why not use Scriptalias ?)
Rod

===

To: Rod Butcher <rbutch@hyena.com.au>
From: Bill Eberle <bill.eberle@zinza.com>
Subject: Re: Location directive not working for mod perl
Date: Wed, 27 Dec 2000 00:02:54 +0900

Rod Butcher wrote:

> I believe you need the trailing /
> i.e. Alias  /perl/  "/home/httpd/perl/"

Yes, that was it...thanks!

>
> (but why not use Scriptalias ?)

Somewhere in the perl.apache.org docs it was suggested that Alias was
preferrable to ScriptAlias for mod_perl.  I'll have another look.


===

To: Bill Eberle <bill.eberle@zinza.com>
From: Stas Bekman <stas@stason.org>
Subject: Re: Location directive not working for mod perl
Date: Tue, 26 Dec 2000 16:37:23 +0100 (CET)

On Wed, 27 Dec 2000, Bill Eberle wrote:

> Rod Butcher wrote:
> 
> > I believe you need the trailing /
> > i.e. Alias  /perl/  "/home/httpd/perl/"
> 
> Yes, that was it...thanks!
> 
> >
> > (but why not use Scriptalias ?)
> 
> Somewhere in the perl.apache.org docs it was suggested that Alias was
> preferrable to ScriptAlias for mod_perl.  I'll have another look.

http://perl.apache.org/guide/config.html#Alias_Configurations

===

To: modperl@apache.org
From: Vivek Khera <khera@kciLink.com>
Subject: Re: Location directive not working for mod perl
Date: Tue, 26 Dec 2000 11:35:29 -0500

>>>>> "RB" == Rod Butcher <rbutch@hyena.com.au> writes:

RB> I believe you need the trailing / 
RB> i.e. Alias  /perl/  "/home/httpd/perl/"
RB> (but why not use Scriptalias ?)

Because ScriptAlias makes it use mod_cgi rather than mod_perl.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu