Re: alias command in modperl environment
Feng He <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
Thanks a lot. 于 2012-12-19 23:02, Andy Colson 写道: > On 12/19/2012 2:40 AM, Feng He wrote: >> Hello, >> >> <VirtualHost *:80> >> ServerAdmin [email protected] >> ServerName example.com >> >> PerlModule Apache::DBI >> PerlPostConfigRequire /path/to/startup.pl >> >> <Location /> >> SetHandler modperl >> PerlResponseHandler Handler1 >> </Location> >> >> <Location /ip/> >> SetHandler modperl >> PerlResponseHandler Handler2 >> </Location> >> >> Alias /zzz/ "/var/www/zzz/" >> <Directory /var/www/zzz/> >> Options FollowSymLinks MultiViews >> AllowOverride None >> Order allow,deny >> allow from all >> </Directory> >> >> ErrorLog /var/log/apache2/error.log >> LogLevel warn >> CustomLog /var/log/apache2/cdn.access.log combined >> >> </VirtualHost> >> >> >> I put some static files under /var/www/zzz/. >> When accessing these static files, I got 403 error. >> Can't alias command work for this case? >> >> Thanks. > > Here is an apache config I use that works: > > PerlSwitches -I "/pub/www/world" > PerlModule World > > <Location /world> > PerlSetupEnv Off > SetHandler modperl > PerlResponseHandler World > Order allow,deny > Allow from all > </Location> > > <Location /world/css> > SetHandler default-handler > Allow from all > </Location> > > <Location /world/js> > SetHandler default-handler > Allow from all > </Location> > > Alias /world/css /pub/www/world/css > Alias /world/js /pub/www/world/js > > > -Andy