首页 > index.html 不会在访问目录时自动载入

index.html 不会在访问目录时自动载入

CentOS 安装了 nginx,访问网站目录比如 http://x.com/abc 时,不会自动载入 http://x.com/abc/index.html,而是直接 forbidden 了。

但如果访问 http://x.com/abc/index.html 就正常,怎么办?


检查 Nginx 中有没有这项设置:

index index.html;

检查 Nginx 对 /abc 对应的文件目录有没有 r 权限。

【热门文章】
【热门文章】