简体   繁体   English

独角兽Rails服务器始终运行

[英]Unicorn rails server running always

I am using unicorn server for locomotive cms installed on digital ocean in ubuntu 12.04. 我正在将unicorn服务器用于ubuntu 12.04中数字海洋上安装的机车cms。 I am wondering how I keep the server running so when I log out of the ssh session the site stays up and running. 我想知道如何保持服务器运行,因此当我退出ssh会话时,该站点可以正常运行。

This is currently the command I use to get it running 目前这是我用来使其运行的命令

bundle exec unicorn_rails -p 80

Thanks! 谢谢! in advance 提前

you need to set up unicorn with apache or nginx. 您需要使用apache或nginx设置独角兽。 here is a guide for apache + unicorn . 这是apache + unicorn的指南 with that setup you can start and stop server by starting and stopping apache service. 使用该设置,您可以通过启动和停止apache服务来启动和停止服务器。

This is a guide on how to setup Unicorn with nginX which I have followed and used numerous times. 这是有关如何使用nginX设置Unicorn的指南,我已经关注并使用了无数次。

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

Run Unicorn via bundler: 通过捆绑器运行Unicorn:

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

Stop Unicron (if you have followed the guide from above) 停止Unicron(如果您已遵循上面的指南)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM