问题描述
在/home/wwwlogs/access.log中出现如下错误:
[10/Dec/2018:15:11:23 +0800] "GET / HTTP/1.1" 403 564 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
解决方法
#查看nginx启动用户: ps -ef|grep nginx root 1238 1 0 19:08 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf #可以看出是root用户启动 #打开/usr/local/nginx/conf/nginx.conf user www www; #修改为: user root;