getpwnam("www") failed in /etc/nginx/nginx.conf

bernie2436 asked:

I copied the nginx.conf sample onto my ubuntu 12.04 box (I don’t know where to put the other conf files. I’m an nginx noob). When I try to start nginx I get the following error:

abe-lens-laptop@abe:/etc$ sudo service nginx start
Starting nginx: nginx: [emerg] getpwnam("www") failed in /etc/nginx/nginx.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

What does this error mean? How can I fix it? I found this post but my user is already set to www www (if you see in the linked file) How do I change the NGINX user?

My answer:


The user you specified in your configuration, www, doesn’t exist. Either create the user, or choose a user that does exist.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.