homepage Welcome to WebmasterWorld Guest from 54.197.94.241
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
Alias
simon1206




msg:3240012
 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:

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

 

sabai




msg:3241382
 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