Apache2 Virtual Host with ScriptAlias returning 403

Posted by sissonb on Server Fault See other posts from Server Fault or by sissonb
Published on 2012-03-18T23:46:04Z Indexed on 2012/03/19 2:06 UTC
Read the original article Hit count: 641

Filed under:
|

I am trying to reference my libs directory which is a sibling directory to my DocumentRoot.

I am using the following ScriptAlias to try to accomplish this.

ScriptAlias /libs/ "../libs"

But when I go to example.com/libs/ I get a the following error

Forbidden
You don't have permission to access /libs/ on this server

I am able to view the libs directory using the following configuration so I don't think it's a file permission error.

<VirtualHost *>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot C:/www/libs
<VirtualHost *>

More relevant httpd.cong setting below

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
<Directory "C:/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order Deny,Allow
    Deny from none
    Allow from all
</Directory>
NameVirtualHost *
<VirtualHost *>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot C:/www/example
    ScriptAlias /libs/ "../libs"
    <Directory "C:/www/libs">
        Options Indexes FollowSymLinks
        AllowOverride None
        Options +ExecCGI
        Order Deny,Allow
        Deny from none
        Allow from all
    </Directory>
</VirtualHost>

© Server Fault or respective owner

Related posts about apache2

Related posts about scriptalias