課程
/后端開發(fā)
/PHP
/PHP入門篇
請輸入問答內(nèi)容...Not Found The requested URL / was not found on this server
2018-01-14
源自:PHP入門篇
正在回答
php環(huán)境問題 注意排查下
1、相關(guān)文件是否丟失?2、DocumentRoot指向是否有錯誤?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?如果你的站點不在根目錄,設(shè)置如下:?代碼如下 復(fù)制代碼?
提示把Apache的配置文件httpd.conf中的Include conf/extra/httpd-vhosts.conf改為#Include conf/extra/httpd-vhosts.conf,頓時恍然大悟,肯定是因為之前我配置了“wampserver的本地虛擬服務(wù)器環(huán)境”,而現(xiàn)在我想把本地項目訪問從虛擬環(huán)境訪問(www.wanysys.cc這種方式)改為用http://localhost/這種方式訪問,所以導(dǎo)致服務(wù)器找不到用戶請求的URL,最后,按照上面的提示更改后重啟wampserver的Apache服務(wù),發(fā)現(xiàn)wampserver的Apache本地訪問成功了!??!
舉報
PHP入門教程輕松學(xué)習(xí),行業(yè)大牛幫您快速掌握PHP編程基礎(chǔ)知識。
1 回答The requested URL / was not found on this server.
3 回答The requested URL / was not found on this server.
2 回答The requested URL / was not found on this server.???
1 回答The requested URL /test.php was not found on this server
1 回答輸出localhost報 404Not Found The requested URL / was not found on this server. 什么情況~~~
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2018-03-05
php環(huán)境問題 注意排查下
1、相關(guān)文件是否丟失?
2、DocumentRoot指向是否有錯誤?
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?
如果你的站點不在根目錄,設(shè)置如下:?
代碼如下 復(fù)制代碼?
2018-03-05
提示把Apache的配置文件httpd.conf中的Include conf/extra/httpd-vhosts.conf改為#Include conf/extra/httpd-vhosts.conf,頓時恍然大悟,肯定是因為之前我配置了“wampserver的本地虛擬服務(wù)器環(huán)境”,而現(xiàn)在我想把本地項目訪問從虛擬環(huán)境訪問(www.wanysys.cc這種方式)改為用http://localhost/這種方式訪問,所以導(dǎo)致服務(wù)器找不到用戶請求的URL,最后,按照上面的提示更改后重啟wampserver的Apache服務(wù),發(fā)現(xiàn)wampserver的Apache本地訪問成功了!??!