Build wamp locally and enter http://127.0.0.1 to access normally. When entering http://localhost/, apache will prompt You don't have permission to access/on this server. How to solve it?
- Find httpd.conf, open httpd.conf with Notepad, and copy
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- </Directory>
Change it here to:
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Allow from all
- </Directory>
Another place will be below
- # onlineoffline tag - don't remove
- Order Deny,Allow
- Deny from all
- Allow from 127.0.0.1
- </Directory>
Change Deny from all to: Allow from all and restart all services.
Now when I open localhost or 127.0.0.1, I find that I can access it, but when I access phpmyadmin, the prompt "You don't have permission to access /phpmyadmin/ on this server." appears.
- As a workaround, open the following file:
C:\wamp\alias\phpmyadmin.conf //This is the content of your wamp installation directory, open it with Notepad
Change it to this:
- <Directory "c:/wamp/apps/phpmyadmin3.5.1/">
- Options Indexes FollowSymLinks MultiViews
- AllowOverride all
- Order Deny,Allow
- Allow from all
- Allow from 127.0.0.1
- </Directory>
After the modification is saved, restart wamp, and it's done!
from:https://blog.csdn.net/hong0220/article/details/40262729