文章详情页
nginx - index.html 不会在访问目录时自动载入
浏览:128日期: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. 极光推送 - Android app消息推送 百度 极光 个推 信鸽哪个好一些?2. javascript - 为什么当index等于5的时候,不在当前页面跳转到百度?不跳转的代码在倒数第五行3. android - VideoView与百度Map冲突4. javascript - 微信支付问题5. javascript - typescript关于接口,对象字面量额外属性检测问题,为什么使用断言或者变量时就不会检测额外属性?6. html - CSS 怎么筛选没有id的某元素7. javascript - 百度搜索网站,如何让搜索结果显示一张图片加上一段描述,如图;求教8. angular.js - angularjs如何动态改变ng-model值,在controller中获取input中输入的值并组合post发送到后台9. 为什么微信内置浏览器用$_COOKIE取不到值?10. mongoDB怎么把数据导出为csv或excel?
排行榜
