# Multiple applications

**URL:** <https://www.ruby-forum.com/t/multiple-applications/91969>\
**Category:** Deployment\
**Created:** [April 13, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/multiple-applications/91969 "2007-04-13T21:40:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 13, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/multiple-applications/91969/1 "2007-04-13T21:40:16Z")

</div>

Hi,

I’ve decided to go with Nginx and mongrel clusters. The setup is very  
simple and works well.

My question is related to running multiple applications. For Nginx,  
should I run one instance (one config file) and then add in virtual  
hosts within that one config file? Or should I run multiple instances,  
each with their own config?

For mongrel clusters… is it possible to startup a single cluster of  
10, and then have 3 completely different applications that one  
cluster? Are there problems with this? Is it better to have a cluster  
per/application?

That’s it for now!

Matt

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 13, 2007, 9:56pm UTC](https://www.ruby-forum.com/t/multiple-applications/91969/2 "2007-04-13T21:56:17Z")

</div>

On 4/13/07, goodieboy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My question is related to running multiple applications. For Nginx,  
> should I run one instance (one config file) and then add in virtual  
> hosts within that one config file? Or should I run multiple instances,  
> each with their own config?

If you want all applications to run off a single IP/Port combo then you  
need  
to setup virtual hosts.

For mongrel clusters… is it possible to startup a single cluster of

> 10, and then have 3 completely different applications that one  
> cluster? Are there problems with this? Is it better to have a cluster  
> per/application?

Cluster is intended to be used for a single application.

–  
Josh K.  
removed\_email\_address@domain.invalid  
[http://joshknowles.com](http://joshknowles.com)

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 14, 2007, 12:06am UTC](https://www.ruby-forum.com/t/multiple-applications/91969/3 "2007-04-14T00:06:30Z")

</div>

Some of this will depend on how you are load balancing, what your front  
end  
network access looks like, whether you want things on different ports,  
etc.  
For example, if you want everyone on port 80, I’d guess you will want  
one  
Nginx, that then directs the requests, based on domain, path, etc. to  
the  
appropriate mongrel\_clusters. I would for sure run a mongrel cluster  
per  
application (I don’t think you can do it any other way, but why would  
you -  
you want to shield your apps from each other).

On 4/13/07, goodieboy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> each with their own config?
> 
> >

–  
Chris B.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 16, 2007, 8:14pm UTC](https://www.ruby-forum.com/t/multiple-applications/91969/4 "2007-04-16T20:14:20Z")

</div>

OK thanks for your help! I’ve come up with a solution that seems to  
work pretty well. Here is the new post:

[http://groups.google.com/group/rubyonrails-deployment/t/719783b55713f3ab](http://groups.google.com/group/rubyonrails-deployment/t/719783b55713f3ab)

Matt

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 14, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/multiple-applications/91969/5 "2007-04-14T16:01:30Z")

</div>

I’m also in the same situation whereby I’d like to deploy multiple  
instances of the same application using sub-domains similar to what  
[wordpress.com](http://wordpress.com) does when you signup for a new blog i.e.  
[http://hackersapien.crazyapps.com](http://hackersapien.crazyapps.com) .This is virgin territory for me so  
any help in terms of deployment would really go a long way, I’m using  
a dedicated server and I’m yet to decide on which deployment solution  
to go ahead with.
