Foreman 不使用 NGINX

2023-12-26

我正在尝试使用Foreman https://github.com/ddollar/foreman(版本 0.31.0)来管理我们应用程序的进程,但我对 nginx (nginx/1.0.10 + Phusion Passenger 3.0.11) 的运气不太好。

这是我的 Procfile 中的相关行:

nginx: sudo /home/ubuntu/nginx/sbin/nginx

当我启动应用程序时,Foreman 报告 nginx 已启动,然后立即终止:

$ foreman start
21:18:28 nginx.1   | started with pid 27347
21:18:28 nginx.1   | process terminated
21:18:28 system    | sending SIGTERM to all processes

然而,nginx实际上正在运行,尽管福尔曼另有报告。


同样,如果我导出到 Upstart:

rvmsudo foreman export upstart /etc/init -a my_app -u ubuntu

and run sudo start my_app,nginx正常启动。但sudo stop my_app 不停止 nginx。它继续运行。

让 nginx 与 Foreman 一起工作有什么技巧吗?

注:我发现福尔曼的这个问题 https://github.com/ddollar/foreman/issues/94我想知道这是否相关。


您需要通过将以下内容添加到 nginx.conf 来在前台模式下运行 nginx

daemon off;

您可以使用 -c 参数为 nginx 指定自定义 nginx.conf

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Foreman 不使用 NGINX 的相关文章

随机推荐