Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Alias to directory other than DocumentRoot


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

New User

5+ Year Member

joined:Feb 1, 2007
votes: 0

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:

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

<Directory "/srv/www/perl-lib">
AllowOverride None
Options None
Order allow,deny
Allow from all

<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

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

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



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

Junior Member

10+ Year Member

joined:June 21, 2003
votes: 0

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...]


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members