0

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>
Jase Whatson
  • 297
  • 3
  • 10
  • 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 07:56
  • Log says- client denied by server configuration: /opt/bitnami/apps/gw2c/htdocs/ – Jase Whatson Aug 13 '11 at 08:46
  • @nullptr can you please update your answeri am facing same problem this is the link http://serverfault.com/questions/665481/client-denied-by-server-configuration-opt-bitnami-apps-wordpress-htdocs – Sanjay Nakate Feb 17 '15 at 14:02

2 Answers2

2

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.

womble
  • 95,029
  • 29
  • 173
  • 228
1

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.

quanta
  • 50,327
  • 19
  • 152
  • 213
  • i am facing same issue i have added directory as you say but i am getting same error client denied by server cofiguration in error log file for more details can you check this link http://stackoverflow.com/questions/28337033/client-denied-by-server-configuration-opt-bitnami-apps-wordpress-htdocs – Sanjay Nakate Feb 06 '15 at 07:06