How can I setup nginx to serve virtualhosts with rails(unicorn/passenger) and php-fpm
- by NewAlexandria
I would like to serve multiple sites on one instance.
I install nginx, php-fpm, and a rails app. I use sites like this to guide me.
I configure php-fpm to listen to a local socket
listen = /var/run/php-fpm/php-fpm.sock
I configure ngnix with multiple hosts:
include /etc/nginx/conf.d/*.conf
I have several site php conf files like…