1 頁 (共 1 頁)

apache The requested URL / was not found on this server.

發表於 : 2018-10-19, 08:54
dtchang
例如:
http://127.0.0.1/
回應
The requested URL / was not found on this server.
1.) 此時應檢查 httpd.conf 是否設定要載入 rewrite 模組

代碼: 選擇全部

LoadModule rewrite_module modules/mod_rewrite.so
2.) 文件根目錄設定是否有誤, 例如:

代碼: 選擇全部

DocumentRoot "D:/Inetpub/wwwroot"
<Directory "D:/Inetpub/wwwroot">
    Options FollowSymLinks
    Require all denied
    Require local
    Require ip 127.0.0.1 219.86.132.118
</Directory>
3.) 是否設有 vhosts

代碼: 選擇全部

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
若有則應檢視 httpd-vhosts 中的根目錄設定,如:

代碼: 選擇全部

<VirtualHost *:80>
    ServerAdmin dtchang@chu.edu.tw
    DocumentRoot "D:/Inetpub/wwwroot"
    ServerName 127.0.0.1
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>