Feng He wrote:
Hello,

<VirtualHost *:80>
        ServerAdmin x...@yyy.com
        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?


I believe that you have the following problem :

What you specify in the "<Location />", by default, is inherited by all "sub-Locations" of "/", so for example the location "/zzz/" inherits the "SetHandler modperl" from the location "/".
I don't remember the exact syntax, but try to add the following :

<Location "/zzz/">
  SetHandler default       (or maybe it is "none")
  .. (other directives)
</Location>

Generally, I try to avoid setting a special handler or other special rules for the Location "/", for precisely that kind of reason : you find that you then need to override these defaults in every sub-directory of your setup.

Reply via email to