User to start Passenger (with Nginx)

2020-02-28 07:31发布

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?

3条回答
唯我独甜
2楼-- · 2020-02-28 07:57

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.

查看更多
小情绪 Triste *
3楼-- · 2020-02-28 07:58

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

查看更多
啃猪蹄的小仙女
4楼-- · 2020-02-28 07:58

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.

查看更多
登录 后发表回答