Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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>
share|improve this question

1 Answer 1

up vote 1 down vote accepted

The following is conflicting with each other:

ScriptAlias /libs/ "../libs"
<Directory "C:/www/libs">
    ...
    ...
    Options +ExecCGI
    ...
    ...
    ...
</Directory>

See this link: http://httpd.apache.org/docs/2.0/mod/mod_alias.html#scriptalias

Both instructions are basically the same thing, except that you're missing the SetHandler line in Directory.

Try removing the Options line, or adding the SetHandler line in your Directory block and changing ScriptAlias for Alias...

share|improve this answer
1  
Thanks for the reference. Looks like I needed to use Alias and not ScriptAlias as I am trying to serve up static content. –  sissonb Mar 19 '12 at 1:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.