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

So im getting the error 'Forbidden You don't have permission to access / on this server.' when I go to ec2.guildwars2community.com using this config

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName ec2.guildwars2community.com
    DocumentRoot /opt/bitnami/apps/gw2c/htdocs
    Options Indexes MultiViews +FollowSymLinks
</VirtualHost>

However if I just use directory a based setup like below it works ok. If i go to http://107.20.230.123/gw2c/

Alias /gw2c/ "/opt/bitnami/apps/gw2c/htdocs/"
Alias /gw2c "/opt/bitnami/apps/gw2c/htdocs"

<Directory "/opt/bitnami/apps/gw2c/htdocs">
    Options Indexes MultiViews +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
share|improve this question
1  
Add a ErrorLog directive for your virtual host, restart Apache and try again to see what the logs says. –  quanta Aug 13 '11 at 7:56
    
Log says- client denied by server configuration: /opt/bitnami/apps/gw2c/htdocs/ –  nullptr Aug 13 '11 at 8:46
add comment

2 Answers

up vote 2 down vote accepted

The error logs will tell you for sure, but my initial feeling would be that you're missing the necessary Allow directive to permit access to the document root. You don't make it clear if the <Directory> entry in your second configuration example is present when you're using the <VirtualHost>, and if so, where it is, but if it's missing or in the wrong place, then there won't be any permission to access the filesystem and hence you'll get the error you're seeing.

share|improve this answer
    
Log says - client denied by server configuration: /opt/bitnami/apps/gw2c/htdocs/ –  nullptr Aug 13 '11 at 8:46
    
That's the error message I was expecting. –  womble Aug 13 '11 at 8:46
    
Thank you. I didnt realize <Directory> had to be in <VirtualHost> –  nullptr Aug 13 '11 at 8:54
add comment

Add a <Directory> block same as the second configuration to the first and try again. E.g:

<VirtualHost *:80>
    ServerName ec2.guildwars2community.com
    DocumentRoot /opt/bitnami/apps/gw2c/htdocs
    ErrorLog ...

    <Directory "/opt/bitnami/apps/gw2c/htdocs">
        Options -Indexes MultiViews +FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

You should remove the AllowOverride All directive or specific only things that you want to allow.

share|improve this answer
add comment

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.