1

我正在使用 nginx 和乘客的 VPS 上的同一域下运行多个 rails 应用程序和一个 sinatra 应用程序。当我部署代码时,我需要为已更新的应用程序重新启动应用程序进程。现在我正在运行,service nginx stop然后service nginx start重新启动所有乘客流程。不得不重新启动 nginx 而不仅仅是目标乘客进程似乎很愚蠢。有没有办法做这样的事情?

这是我的 nginx.conf 文件: https ://gist.github.com/srt32/8535548 。谢谢。

4

1 回答 1

4

转到 Rails 应用程序的根目录并触摸 tmp/restart.txt 文件。

touch /webapps/mycook/tmp/restart.txt

重新启动应用程序后删除restart.txt,但不是强制性的。

参考 - http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application

于 2014-01-21T07:11:53.967 回答