User to start Passenger (with Nginx)

可紊 提交于 2019-12-30 04:40:28

问题


I have Nginx with Passenger. In nginx.conf I have line:

user pass users;

and Nginx process works on 'pass' user, but Passenger* processes work on 'nobody' user.

I can run Passenger standalone:

sudo passanger start -e production -p 80 --user=pass

How can I run Passenger with Nginx with my custom user?


回答1:


Put the following into your nginx.conf in the http block:

passenger_default_user custom_username;
passenger_default_group custom_group;

You can find more configuration options here:

http://modrails.com/documentation/Users%20guide%20Nginx.html#PassengerDefaultUser




回答2:


At one point the user and group were determined by the owners of the config.ru file. I'm pretty sure this is still the case.




回答3:


You can pass a user line into your nginx conf. http://wiki.nginx.org/CoreModule#user

I suggest that in the future you ask server questions on ServerFault, they usually know a lot more about nginx and passenger.



来源:https://stackoverflow.com/questions/6214913/user-to-start-passenger-with-nginx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!