Friday, January 28, 2011

Wamp error "Forbidden You don't have permission to access / on this server."

Well was faced with such a situation when i tried accessing my site remotely from a new installation of WAMP2.0 on the server. i googgled for an answer but most of the posts didn't quite get straight to the point why this was happening. I read around and got the solution.

Why the error
WAMP has an installation of apache (a web server) bundled together and it is configured to receive local connection by default so if you try accessing the site from outside the hosting machine then you will get that error.

Solution
You will need to edit the configuration file for apache to enable external access. Get to the hosting machine, locate the system tray click on the WAMP icon -> Apache -> httpd.conf, this will open up the apache config file in notepad. locate line '' (without the single quotes around line 207), a few lines below before you meet the closing tag '' you will find the line below:
Deny from all
Allow from 127.0.0.1

replace them with the lines below:

#Deny from all
#Allow from 127.0.0.1
Allow from all

Save file and close it, go back to the system tray click of the Wamp icon -> stop all services then wait for 1 min then back to the system tray again Wamp icon -> start all services.

Thats it you can now access your site from anywhere.

No comments:

Post a Comment