Rails Nginx + Unicornを使用する

Rails で アプリケーションサーバーのUnicorn と Nginxを使う方法です。

参考

How To Deploy a Rails App with Unicorn and Nginx on Ubuntu 14.04 | DigitalOcean

ポイント

だいたい参考サイトの通りでOK。Vagrantでの開発時の注意ポイントは次の通り。

  • 環境がproductionになっているので、developmentにする。
  • Unicornのsocketsの配置位置がVagrantの共有フォルダ上になる場合は、作成できないので、別の場所にする。