user4407686
user4407686

Reputation:

Why the error "Forbidden" "You don't have permission to access / on this server." is appearing after installing wampserver2.2d on Windows 7?

I just downloaded wampserver2.2d-x32.exe from source forge and installed on my machine running on Windows 7 operating system.

The setup went well. Now when I started wampserver the W icon has turned Green but when I click on localhost link I get following message in a browser window :

**Forbidden**

You don't have permission to access / on this server.

Even I tried to check phpmyadmin by hitting the link http://localhost/phpmyadmin then I got following message in a browser window :

**Forbidden**

 You don't have permission to access / on this server.

Can someone please help me in resolving these issues?

Thanks.

Upvotes: 2

Views: 1750

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94662

The problem is probably that your browser is using the ip address ::1 the IPV6 localhost address and WAMPServer 2.2d (being rather old now) was released before IPV6 was normally available on Windows Boxes so the httpd.conf does not contain this ip as a valid ip.

So first change the httpd.conf file like this ( use the menus to edit httpd.conf)

Find the Listen parameter it probably looks like this

Listen 80

Change it to

Listen 0.0.0.0:80
Listen [::0]:80

Then look for this section

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1

And change it to

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1 ::1

Now check the C:\windows\system32\drivers\etc\hosts file and make sure you have at least these entries in it

127.0.0.1  localhost
::1  localhost

To correct phpMyAdmin you will also have to edit the \wamp\alias\phpmyadmin.conf file in the same way, as phpMyAdmin is secured seperately in WAMPServer.

Edit \wamp\alias\phpmyadmin.conf

Look for this section :

Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1

And also add the IPV6 localhost address like this

Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1 ::1 

Upvotes: 2

Related Questions