RailsxNginx x Unicornの組み合わせをよく見かける気がします。 私もその1人なのですが、 Nginx と Unicornを使ったらそれ ぞれに自動起動の設定を入れておくべきだと思います。 以前にNginxについては、自動起動の方法を書いているので Nginxについてはそちらを参照してください。 marketing-web.hatenablog.com 今回は、Unicornの自動起動がメインの記事になります。 起動スクリプトの作成 /etc/init.d/unicorn を以下のように作ります。 #!/bin/sh #chkconfig:2345 85 70 #description:unicorn shell NAME="Unicorn" ENV=production ROOT_DIR="/var/www/pr-mall/current" USER="admin"
![NginxとUnicornを使っていたら自動起動設定は必須 - ECのウェブ担当者のメモ](https://cdn-ak-scissors.b.st-hatena.com/image/square/1fddcd3dab6b71355d9e59a338a99a4b885bf432/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fj%2Fjun9632%2F20160304%2F20160304224550.png)