启动 Nginx 之前,可以用 nginx -t 检测一下配置文件是否正确。 以下是输出信息: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2013/03/03 11:57:32 [warn] 25539#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2013/03/03 11:57:32 [emerg] 25539#0: open() "/var/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed
我曾经把默认用户从 www-data 改为我现时的用户名,nginx 对此有明确要求吗?其它的警告或错误该怎样修复?谢谢!