Nginx 403 error:directory index of “xxx“ is forbidden
现象:在部署好Nginx服务器后,输入IP地址和端口号,返回403 Forbiddent。查看日志nginx/logs/error.log,发现报错信息为:directory index of “xxx” is forbidden。其中,xxx是在/etc/nginx/nginx.conf中指定的root目录。 报错原因:直接使用IP地址和端口号访问时,需要指定index,如果未指定,就会出现该报错。 解决方法:在/etc/nginx/nginx.conf中做如下修改: 原文:https://www.jianshu.com/p/e837e63ff511