課程
/后端開發
/PHP
/PHP入門篇
請輸入問答內容...Not Found The requested URL / was not found on this server
2018-01-14
源自:PHP入門篇
正在回答
php環境問題 注意排查下
1、相關文件是否丟失?2、DocumentRoot指向是否有錯誤?3、apache是否開啟了rewrite_module模塊?/etc/httpd/conf/httpd.conf,發現原因:?Apache的rewrite_module模塊,支持.htaccess
rewrite_module沒開啟,開啟過程如下:?centos的配置文件放在:?代碼如下 復制代碼?/etc/httpd/conf/httpd.conf?打開文件找到:?代碼如下 復制代碼?LoadModule rewrite_module modules/mod_rewrite.so?將前面”#”去掉,如果不存在則添加上句。?如果你的網站是根目錄的話:找到?代碼如下 復制代碼?Options FollowSymLinks?AllowOverride None?將上面的None改為All?如果你的站點不在根目錄,設置如下:?代碼如下 復制代碼?
提示把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本地訪問成功了?。?!
舉報
PHP入門教程輕松學習,行業大牛幫您快速掌握PHP編程基礎知識。
3 回答The requested URL / was not found on this server.
1 回答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 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-03-05
php環境問題 注意排查下
1、相關文件是否丟失?
2、DocumentRoot指向是否有錯誤?
3、apache是否開啟了rewrite_module模塊?
/etc/httpd/conf/httpd.conf,發現原因:?
Apache的rewrite_module模塊,支持.htaccess
rewrite_module沒開啟,開啟過程如下:?
centos的配置文件放在:?
代碼如下 復制代碼?
/etc/httpd/conf/httpd.conf?
打開文件找到:?
代碼如下 復制代碼?
LoadModule rewrite_module modules/mod_rewrite.so?
將前面”#”去掉,如果不存在則添加上句。?
如果你的網站是根目錄的話:找到?
代碼如下 復制代碼?
Options FollowSymLinks?
AllowOverride None?
將上面的None改為All?
如果你的站點不在根目錄,設置如下:?
代碼如下 復制代碼?
2018-03-05
提示把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本地訪問成功了?。?!