文章詳情頁
nginx - index.html 不會在訪問目錄時自動載入
瀏覽:95日期:2023-08-23 17:26:22
問題描述
CentOS 安裝了 nginx,訪問網站目錄比如 http://x.com/abc 時,不會自動載入 http://x.com/abc/index.html,而是直接 forbidden 了。
但如果訪問 http://x.com/abc/index.html 就正常,怎么辦?
問題解答
回答1:檢查 Nginx 中有沒有這項設置:
index index.html;
檢查 Nginx 對 /abc 對應的文件目錄有沒有 r 權限。
http://nginx.org/en/docs/http/ngx_http_index_module.htmlhttps://help.ubuntu.com/community/FilePermissions 標簽:
HTML
相關文章:
排行榜
