文章详情页
nginx - index.html 不会在访问目录时自动载入
浏览:252日期: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容器呢SSH为什么连不通呢?2. Docker for Mac 创建的dnsmasq容器连不上/不工作的问题3. docker网络端口映射,没有方便点的操作方法么?4. docker images显示的镜像过多,狗眼被亮瞎了,怎么办?5. 如何解决Centos下Docker服务启动无响应,且输入docker命令无响应?6. docker gitlab 如何git clone?7. docker api 开发的端口怎么获取?8. 前端 - 类到底该如何去命名 .newsList 这种的命名难道真的不是过度语义化吗?~9. dockerfile - [docker build image失败- npm install]10. Hbuilder中的phpMyAdmin访问题
排行榜

网公网安备