Tag Archives: [emerg]: getpwnam(“nginx”) failed

nginx: [emerg] getpwnam(“nginx”) failed [How to Fix]

[root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx 
nginx: [emerg] getpwnam("nginx") failed

Unable to start because Nginx user is not installed

[root@localhost nginx-1.11.2]# useradd -s /sbin/nologin -M nginx
[root@localhost nginx-1.11.2]# id nginx
[root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx 
[root@localhost nginx-1.11.2]# netstat -tlunp | grep nginx
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9709/nginx: master