1
votes

I've edited my httpd.conf, and I'm still getting the error:

"Forbidden. You don't have permission to access / on this servers"

I'm trying to allow everyone to access my WAMP website. I added this into my httpd.conf file:

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

After restarting my WAMP server, I'm still getting the error when I don't access my site from my local machine.

I'm using WAMPServer 2.5 which has Apache 2.4.9.

2
Do you have a tray icon? As normally when you install WAMP a tray icon appears allowing you to switch the site online and offline. - Professor of programming
What version of WAMPServer are you running i.e. WAMPServer 2,5 or an older version? - RiggsFolly

2 Answers

1
votes

The section of httpd.conf you changed protects the drive that Apache is installed on and should be set to

<Directory />
    AllowOverride none
    Require all denied
</Directory>

Now the section of httpd.conf that you need to look for is this one

it starts with

<Directory "c:/wamp/www/">

and inside that section there is a line like this

#   onlineoffline tag - don't remove
Require local

To allow access from any ip address change it to this

#   onlineoffline tag - don't remove
Require all granted

You should be able to do this by using the wampmanager menus like so:

wampmanager -> Put Online

However if you have changed the section of code around the # onlineoffline tag - don't remove line, the automatic edit done by using the menus may not work, so its probably easier to do it manually, or at least check that the menu controlled edit worked properly.

-2
votes

Change DirectoryRoot to <Directory c:/wamp/www> Make sure the ownership and permissions of C:\wamp\www

User: yourusername
Permission: Allow  - Read and execute and Read permissions

you should try this:

Edit C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf (apache2.4.9 might be different, depends on your apache version)

Scroll all the way down until you find Deny from all and change that too Allow from all

EDIT Answer to @Bonner

Your permissions are still wrong

If they still wrong, please provide the right permission, instead of just point it out. Based on "my poor knowledge" I think the permission are fine.

you have failed to ask whether the WAMP tray icon is appearing or not

Based on question description

After restarting my WAMP server,

I assumed WAMP tray appears.

If you make changes to the httpd-vhosts.conf they will be overwritten by the tray icon software when an option is changed

False. WAMP Control Panel let you edit configuration files like my.ini, httpd.conf, php.ini, etc. However, you can't edit httpd-vhosts.conf from WAMP Control Panel.