I’ve got a standard nginx config (NameBright - Coming Soon)
which I use to server one php app and one rails app. My
mongrel_cluster.yml file resides in /etc/mongrel_cluster and is a
symlink to my_app1’s config/mongrel_cluster.yml file. That file looks
like this:
cwd: /var/www/my_app1
port: 8000
environment: production
group: www-data
user: www-data
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 3
All is great and works fine, but I’m wondering how to extend this to be
able to run multiple rails apps at the same time? Do I have to modify
my nginx.conf like so?
#for my_app1
upstream mongrel {
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}
#for my_app2
upstream mongrel {
server 127.0.0.1:8100;
server 127.0.0.1:8101;
server 127.0.0.1:8102;
}
And if I do, how do I modify the mongrel_cluster file so it knows to
launch both mongrel clusters?
Thanks in advance…