文章詳情頁
nginx - index.html 不會在訪問目錄時自動載入
瀏覽:217日期: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
相關文章:
1. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””2. docker鏡像push報錯3. Docker for Mac 創建的dnsmasq容器連不上/不工作的問題4. javascript - 在 model里定義的 引用表模型時,model為undefined。5. 利用IPMI遠程安裝centos報錯!6. node.js - mongodb查找子對象的名稱為某個值的對象的方法7. 運行python程序時出現“應用程序發生異常”的內存錯誤?8. html5和Flash對抗是什么情況?9. phpstudy8.1沒集成mysql-front10. 前端 - @media query 使用出現的問題?
排行榜

網公網安備