# Deploying multiple applications on Nginx/Mysql stack without subdomains

**URL:** <https://www.ruby-forum.com/t/deploying-multiple-applications-on-nginx-mysql-stack-without-subdomains/134047>\
**Category:** Deployment\
**Created:** [April 7, 2008, 11:01am UTC](https://www.ruby-forum.com/t/deploying-multiple-applications-on-nginx-mysql-stack-without-subdomains/134047 "2008-04-07T11:01:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mister\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/919ad9/32.png) [@Mister\_C](https://www.ruby-forum.com/u/Mister_C)\
**Post date:** [April 7, 2008, 11:01am UTC](https://www.ruby-forum.com/t/deploying-multiple-applications-on-nginx-mysql-stack-without-subdomains/134047/1 "2008-04-07T11:01:56Z")

</div>

Hi Everybody!

I need some help with a RoR Server I am setting up…

I need to run multiple rails applications on one server, each app with  
it’s own domain ([www.app1.org](http://www.app1.org), [www.app2.org](http://www.app2.org) etc)… I think Nginx is  
more suitable for this than apache, so I’m trying to figure out what  
to do (I always deployed on apache machines). I’m going to use  
capistrano/deprec for the stack installation and application  
deployment, but I don’t think there is any ‘standard’ recipe that fits  
my situation, so was thinking to use the custom recipes found at  
[http://wiki.slicehost.com/doku.php?id=capistrano\_recipe\_and\_howto\_for\_rails\_mongrel\_and\_nginx](http://wiki.slicehost.com/doku.php?id=capistrano_recipe_and_howto_for_rails_mongrel_and_nginx)  
(i’m not on slicehost but should work anyway) and change them  
according to my needs… My idea was to write an add\_application task  
to deploy the app, but customizing the configure\_nginx so that if the  
nginx.conf file is already on the server (created by another  
application) it just adds a virtual host to the file insteas of  
overwriting it…

Is this a viable solution or is there an easier/better way to do this?

Any feedback would be appreciated…  
Filippo

(Thanks to jonmagic for the recipes… As a beginner I found them very  
useful.)
