用户启动 Passenger (使用 Nginx)
我有 Nginx 和 Passenger。在 nginx.conf 中,我有一行:
user pass users;
Nginx 进程适用于“pass”用户,但 Passenger* 进程适用于“nobody”用户。
我可以独立运行 Passenger:
sudo passanger start -e production -p 80 --user=pass
如何使用自定义用户通过 Nginx 运行 Passenger?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将以下内容放入 http 块中的 nginx.conf 中:
您可以在此处找到更多配置选项:
http://modrails.com/documentation/Users%20guide%20Nginx.html#PassengerDefaultUser
Put the following into your nginx.conf in the http block:
You can find more configuration options here:
http://modrails.com/documentation/Users%20guide%20Nginx.html#PassengerDefaultUser
在某一时刻,用户和组是由 config.ru 文件的所有者确定的。我很确定情况仍然如此。
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.
您可以将用户行传递到 nginx conf 中。
http://wiki.nginx.org/CoreModule#user
我建议你将来问关于ServerFault的服务器问题,他们通常对nginx和passenger了解很多。
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.