homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Alias to directory other than DocumentRoot

5+ Year Member

Msg#: 3240010 posted 9:23 pm on Feb 1, 2007 (gmt 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





10+ Year Member

Msg#: 3240010 posted 12:35 am on Feb 3, 2007 (gmt 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...]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved