nginx directory index of “/xxx/xxx/“ is forbidden, client: xxx:xxxx:xxxx:xxxx, server:

第一:

先检查一下路径 看是否存在index.html 
这里注意一下 nginx是不用写后面index.html的
比如: /usr/bin/html/index.html  直接写/usr/bin/html  后面index.html不用写

第二:

权限问题 一般都是由于权限不够 无法读取文件导致的
查看nginx.conf   正常情况下应该在顶部会有一个 user root; 就像

[root@vultrguest nginx]# cat nginx.conf
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;		#修改这行代码 ---> user root;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;


修改user nginx; -----> user root;

第三步就自行查看错误日志了 在nginx.conf里面有日志路径 error_log /xxx/xx

你可能感兴趣的:(linux,nginx)