nginx - index.html 不会在访问目录时自动载入
阿神
阿神 2017-04-25 09:01:10
0
1
728

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.html
  • https://help.ubuntu.com/community/FilePermissions
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!