Multiple sites with mongrel and nginx

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
pid_file: log/
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 {

#for my_app2
upstream mongrel {

And if I do, how do I modify the mongrel_cluster file so it knows to
launch both mongrel clusters?

Thanks in advance…

I guess I’ll partially answer my own question…

I made the changes to nginx.conf and started the mongrel clusters
manually with sudo mongrel_rails cluster::start and it works. Still, it
would be nice to know if it’s possible to fire off 2 different mongrels
via the /etc/init.d/mongrel_cluster start command…


set CONF_DIR to the directory containing your mongrel configurations,

/etc/init.d/mongrel_cluster restart

does a full restart of all the clusters on the box.