本地搭建wamp,當輸入http://localhost/,apache出現You don't have permission to access/on this server.的提示,解決辦法: 找到httpd.conf,用記事本打開httpd.conf,然後將 <Directory /> Opt ...
本地搭建wamp,當輸入http://localhost/,apache出現You don't have permission to access/on this server.的提示,解決辦法:
- 找到httpd.conf,用記事本打開httpd.conf,然後將
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- </Directory>
改為:
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Allow from all
- </Directory>
還有一處將下麵
- # onlineoffline tag - don't remove
- Order Deny,Allow
- Deny from all
- Allow from 127.0.0.1
- </Directory>
將Deny from all 改為:Allow from all ,然後重新啟動所有服務後,打開localhost或127.0.0.1時發現可以訪問了,但訪問phpmyadmin時候,出現“You don't have permission to access /phpmyadmin/ on this server.”的提示。
- 解決方法,打開如下文件:
C:\wamp\alias\phpmyadmin.conf //這個就是你的wamp的安裝目錄下的內容,用記事本打開
修改成這樣:
- <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>
修改保存後,重啟wamp後 ,就可以訪問了!