【问题标题】:Unicorn rails server running alwaysUnicorn rails 服务器始终运行
【发布时间】:2013-10-03 19:48:21
【问题描述】:

我正在使用 unicorn 服务器来安装在 ubuntu 12.04 的数字海洋上的机车 cms。我想知道如何让服务器保持运行,所以当我退出 ssh 会话时,站点会保持正常运行。

这是我目前用来让它运行的命令

bundle exec unicorn_rails -p 80

谢谢!提前

【问题讨论】:

    标签: ruby-on-rails unicorn locomotivecms


    【解决方案1】:

    您需要使用 apache 或 nginx 设置 unicorn。 here is a guide for apache + unicorn。使用该设置,您可以通过启动和停止 apache 服务来启动和停止服务器。

    【讨论】:

      【解决方案2】:

      这是一个关于如何使用 nginX 设置 Unicorn 的指南,我已经遵循并使用了很多次。

      https://gist.github.com/billie66/3696537

      通过捆绑器运行 Unicorn:

      bundle exec unicorn -c config/unicorn.rb -E production -D -p 8089
      

      停止 Unicron(如果您已按照上面的指南进行操作)

      kill -9 'cat /path/to/your/app/tmp/pids/unicorn.pid'
      

      【讨论】:

        猜你喜欢
        • 2020-02-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-29
        • 2018-03-25
        • 2016-05-04
        • 2014-10-31
        • 2011-02-03
        相关资源
        最近更新 更多