[Switch] You don't have permission to access/on this server prompt appears on wamp

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
  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Deny from all
  6. </Directory>

Change it here to:

  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Allow from all
  6. </Directory>

 Another place will be below

  1. # onlineoffline tag - don't remove
  2. Order Deny,Allow
  3. Deny from all  
  4. Allow from 127.0.0.1
  5. </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:

  1. <Directory "c:/wamp/apps/phpmyadmin3.5.1/">
  2.     Options Indexes FollowSymLinks MultiViews
  3.     AllowOverride all
  4.     Order Deny,Allow
  5.     Allow from all
  6.     Allow from 127.0.0.1
  7. </Directory>

After the modification is saved, restart wamp, and it's done!

from:https://blog.csdn.net/hong0220/article/details/40262729

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324982032&siteId=291194637