瀏覽器中輸入local出現(xiàn)Not Found The requested URL / was not found on this server,為啥
請(qǐng)輸入問答內(nèi)容...Not Found The requested URL / was not found on this server
請(qǐng)輸入問答內(nèi)容...Not Found The requested URL / was not found on this server
2018-01-14
舉報(bào)
2018-03-05
php環(huán)境問題 注意排查下
1、相關(guān)文件是否丟失?
2、DocumentRoot指向是否有錯(cuò)誤?
3、apache是否開啟了rewrite_module模塊?
/etc/httpd/conf/httpd.conf,發(fā)現(xiàn)原因:?
Apache的rewrite_module模塊,支持.htaccess
rewrite_module沒開啟,開啟過程如下:?
centos的配置文件放在:?
代碼如下 復(fù)制代碼?
/etc/httpd/conf/httpd.conf?
打開文件找到:?
代碼如下 復(fù)制代碼?
LoadModule rewrite_module modules/mod_rewrite.so?
將前面”#”去掉,如果不存在則添加上句。?
如果你的網(wǎng)站是根目錄的話:找到?
代碼如下 復(fù)制代碼?
Options FollowSymLinks?
AllowOverride None?
將上面的None改為All?
如果你的站點(diǎn)不在根目錄,設(shè)置如下:?
代碼如下 復(fù)制代碼?
2018-03-05
提示把Apache的配置文件httpd.conf中的Include conf/extra/httpd-vhosts.conf改為#Include conf/extra/httpd-vhosts.conf,頓時(shí)恍然大悟,肯定是因?yàn)橹拔遗渲昧恕皐ampserver的本地虛擬服務(wù)器環(huán)境”,而現(xiàn)在我想把本地項(xiàng)目訪問從虛擬環(huán)境訪問(www.wanysys.cc這種方式)改為用http://localhost/這種方式訪問,所以導(dǎo)致服務(wù)器找不到用戶請(qǐng)求的URL,最后,按照上面的提示更改后重啟wampserver的Apache服務(wù),發(fā)現(xiàn)wampserver的Apache本地訪問成功了?。?!