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

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM