1. 程式人生 > >Not Found The requested URL / was not found on this server.

Not Found The requested URL / was not found on this server.

後來 wamp Coding 錯誤 驗證 tar tle ted apach

http://www.wanysys.cc/coding/php/800.html

今天在做本地PHP項目的時候,想把之前wampserver的本地虛擬服務器環境訪問方式改為本地localhost訪問方式,打開wampserver的Apache中的http://localhost/顯示如下錯誤,提示The requested URL / was not found on this server.(在服務器上找不到請求的URL),百度各種方法都未解決,很多人的方法都是不加驗證的復制粘貼別人的東西,根本就不能解決問題,這裏順便鄙視一下某度。


後來還是在老美的網站上找到了一句話:


提示把Apache的配置文件httpd.conf中的Include conf/extra/httpd-vhosts.conf改為#Include conf/extra/httpd-vhosts.conf,頓時恍然大悟,肯定是因為之前我配置了“wampserver的本地虛擬服務器環境”,而現在我想把本地項目訪問從虛擬環境訪問(www.wanysys.cc這種方式)改為用http://localhost/這種方式訪問,所以導致服務器找不到用戶請求的URL,最後,按照上面的提示更改後重啟wampserver的Apache服務,發現wampserver的Apache本地訪問成功了!!!

Not Found The requested URL / was not found on this server.