文章详情页
nginx - index.html 不会在访问目录时自动载入
浏览:216日期: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不显示端口映射呢?2. docker - 各位电脑上有多少个容器啊?容器一多,自己都搞混了,咋办呢?3. angular.js使用$resource服务把数据存入mongodb的问题。4. vim - docker中新的ubuntu12.04镜像,运行vi提示,找不到命名.5. docker容器呢SSH为什么连不通呢?6. docker内创建jenkins访问另一个容器下的服务器问题7. docker绑定了nginx端口 外部访问不到8. dockerfile - [docker build image失败- npm install]9. docker start -a dockername 老是卡住,什么情况?10. android - 优酷的安卓及苹果app还在使用flash技术吗?
排行榜

网公网安备