check nginx配置文件错误:[emerg]: getpwnam(“nginx”) failed

 

1、错误提示:

[root@server include]# /application/nginx/sbin/nginx -t -c /applications/nginx/nginx/nginx.conf
  nginx: [emerg] getpwnam("nginx") failed in /applications/nginx/nginx/nginx.conf:2
  nginx: configuration file /application/nginx/nginx/nginx.conf test failed

2、解决方式

[root@server include]# useradd -s /sbin/nologin -M nginx
[root@server include]# id nginx

3、再次检查配置文件提示:

[root@server include]# /application/nginx/sbin/nginx -t -c /application/nginx/nginx/nginx.conf
nginx: [emerg] getgrnam("wwwgroup") failed in /application/nginx/nginx/nginx.conf:1
nginx: configuration file /application/nginx/nginx/nginx.conf test failed

4、解决方式

[root@chechongserver include]# groupadd wwwgroup

  

posted @ 2018-06-06 15:38  MR__Wang  阅读(6887)  评论(2编辑  收藏  举报