访问nginx的时候报错了403 forbidden
然后看我看nginx的日志/var/log/nginx/error.log里面报错,说明没有权限
[error] 1996#0: *1 open() "/root/nginx/html/favicon.ico" failed (13: Permission denied),
client: 42.120.74.111, server: localhost, request: "GET /favicon.ico HTTP/1.1", host:
"47.91.248.236", referrer: "http://47.91.248.236/"
我推测这是因为nginx的启动用户默认是nobody ,他没有访问/root/nginx/html这个路径的权限,发现是nobody,然后我改成root ,然后重启,解决问题 ,此时访问成功了