本地搭建WampServer,輸入http://127.0.0.1訪問正常,當輸入http://localhost/,apache出現You don't have permission to access/on this server的提示,如何解決?
找到httpd.conf,用記事本打開httpd.conf,有兩處須要修改:php
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- </Directory>
將Deny from all 改成:Allow from all ,而後從新啓動全部服務。apache
還有一處將下面app
- # 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的安裝目錄下的內容,用編輯器打開ide
修改爲這樣: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>
修改保存後,重啓wamp ,搞定收工!spa