Welcome to WebmasterWorld Guest from 54.198.222.129

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Alias to directory other than DocumentRoot

Alias

     
9:23 pm on Feb 1, 2007 (gmt 0)

5+ Year Member



Running httpd version 2.2.3.
I am trying out mod_perl, it is working fine in loading
mod_perl-startup.pl apparently. I am trying to allow access to
perl-lib directory, but get Error 404 with 'http://localhost/perl
DocumentRoot is /srv/www/htdocs/

I thought the scriptAlias would map /perl/ to /srv/www/perl-lib

Conf entries:

httpd.conf
<Directory />
Options None
AllowOverride None
Order deny.allow
Deny from all
</Directory>

/etc/apache2/conf.d/mod_perl.conf
<Directory "/srv/www/perl-lib">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

<IfModule mod_perl.c>
PerlRequire "/etc/apache2/mod_perl-startup.pl"

#ScriptAlias /perl/ "/srv/www/cgi-bin/"
ScriptAlias /perl/ "/srv/www/perl-lib/"
<Location /perl/>
# mod_perl mode
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>

ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
<Location /cgi-perl>
# perl cgi mode
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>

# The /cgi-bin/ ScriptAlias is already set up in httpd.conf

</IfModule>

Simon

12:35 am on Feb 3, 2007 (gmt 0)

10+ Year Member



Never used mod perl, but two things jump to mind:

1) try [localhost...] - with a trailing slash

2) try putting a script in the directory and access [localhost...]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month