nginx – getgrnam (“presmini”) failed

I got this error after installing nginx and trying to run passenger for my ruby apps. I understood that I needed to run nginx as the same user I was using to run my ruby apps. To do this, I had to use the “user” directive in the nginx.conf file to define the startup user to be “presmini” (the same user running my ruby apps). What I screwed up was that the failure

[emerg]: getgrnam(“presmini”) failed in /opt/nginx/conf/nginx.conf:1

is that I wasn’t explicity defining a group in the nginx.conf file, and so it was defaulting to something that does exist. Since I’m on a mac, I just changed the “user” directive in the nginx.conf file to:

user presmini staff

wala! Works great!!

Advertisements

11 Responses to “nginx – getgrnam (“presmini”) failed”

  1. Cameron Says:

    Just wanted to let you know this post was very helpful. I had already gone through a bunch of other posts that didn’t fix the problem.

    Thanks,
    Cameron

  2. Adrian Says:

    Thanks for share this info. this was very useful

  3. Yan Says:

    Whoa! That exactly what I was looking for!
    Mine has another trick though.
    My mac user “y” was listed under group “Admins” (go to Settings: Accounts to see that).
    I wrote “user y Admin” in nginx.conf and it did not work.
    You have to write “user y admin” without capital letter and it finally works.

  4. Jonas Alves Says:

    Thanks!

  5. Igor Iexx Says:

    Thank you! it helped me

  6. Celso Fernandes Says:

    great! 😉

  7. Joshua Mervine Says:

    One addition… don’t forget the semi-colon at the end of the line…

    user presmini staff;

  8. monkeysuziewong Says:

    thks a lot,it solved my problem!

  9. Maxence Winandy Says:

    Last night you saved my life !

  10. Chang-Ching Yeh (@jimyeh00) Says:

    It solved my problem, too.

    Thanks a lot.
    Jim

  11. ijserijse Says:

    Thanks~ This help me out, too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: