关于一个nginx的一个错误解释 “nginx – getgrnam (“presmini”) failed”

{app.params.name}} {app.params.name}} {app.params.name}}

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
修改成类似这样的就可以了


版权声明

davidzhang 创作并维护的 Gowhich 博客采用 创作共用保留署名-非商业-禁止演绎4.0国际许可证。

本文首发于 Gowhich 博客( https://www.gowhich.com ),版权所有,侵权必究。

本文永久链接: https://www.gowhich.com/blog/68

comments powered by Disqus