[英]User to start Passenger (with Nginx)
I have Nginx with Passenger.我有 Nginx 和乘客。 In nginx.conf I have line:
在 nginx.conf 我有一行:
user pass users;
and Nginx process works on 'pass' user, but Passenger* processes work on 'nobody' user.和 Nginx 进程适用于“通过”用户,但乘客 * 进程适用于“无人”用户。
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?如何使用自定义用户使用 Nginx 运行乘客?
Put the following into your nginx.conf in the http block:将以下内容放入http块中的nginx.conf中:
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 http://modrails.com/documentation/Users%20guide%20Nginx.html#PassengerDefaultUser
At one point the user and group were determined by the owners of the config.ru file.在某一时刻,用户和组由 config.ru 文件的所有者确定。 I'm pretty sure this is still the case.
我很确定情况仍然如此。
You can pass a user line into your nginx conf.您可以将用户行传递到 nginx conf 中。 http://wiki.nginx.org/CoreModule#user
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.我建议你以后在ServerFault上问服务器问题,他们通常对nginx和乘客了解很多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.