Nginx (nginx 500 Internal Server Error错误 )error_log is forbidden (13: Permission denied)

ps -ef|grpe nignx 

发现启动nginx 对应的用户为nginx

修改nginx.conf

vim /etc/nginx/nginx.conf

将user nginx; 改为user root;重新启动nginx即可

(有时候/nginx -s reload 或者 service nginx restart 重启命令不能生效 需要关闭nginx后重新启动)

猜你喜欢

转载自www.cnblogs.com/cangshublogs/p/10183423.html