multiple rails apps on nginx and unicorn

后端 未结 3 907
北荒
北荒 2020-12-07 23:32

I successfully setup a rails site using the Screencast 335 deploy to a VPS tutorial. Now I want to add another rails app on a new domain but I am confused about the steps re

3条回答
  •  爱一瞬间的悲伤
    2020-12-08 00:23

    It is really easy to host different apps on one host with Nginx and Unicorn.

    The separation you can get by defining different names of the socket files of each application. Of course you should point the right current/public directories in the server section of nginx.conf.

    The last touch is in the unicorn_init.sh file: on the top of it you should change APP_ROOT with the full path to current/public directory of your application.

    If your setup is similar to the RailsCast's one, all the other things are done by capistrano .

提交回复
热议问题