# Multiple application using apache and mongrel cluster

**URL:** <https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219>\
**Category:** Deployment\
**Created:** [August 19, 2008, 7:12am UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219 "2008-08-19T07:12:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![simi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@simi](https://www.ruby-forum.com/u/simi)\
**Post date:** [August 19, 2008, 7:12am UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219/1 "2008-08-19T07:12:42Z")

</div>

Hi,

I need to deploy two rails applications using apache and mongrel  
cluster.

I have modified VirtualHost and configured mongrel cluster for a single  
application [http://mydomain.com](http://mydomain.com) and it works fine.

The administration application( [http://administrator.mydomain.com](http://administrator.mydomain.com) ) of  
the above is a seperate application and I face problem in deploying it  
in same apache server. ( I have set a seperate VirtualHost and  
configured mongrel cluster ).

I have seperate conf files with the VirtualHost setting, namely  
admin.conf and app.conf, and included it in apached httpd.conf file

I’m able to deploy both the application individually but not together.  
The application configuration file which is included first in apache  
httpd.conf file is only served( it is also set as the default server ).

I even tried by setting the apps in different ports 80 and 8080

If anyone could think of a solution kindly help me to fix it.

Thanks  
Simi

---

<div class="post-metadata">

**Author:** ![simi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@simi](https://www.ruby-forum.com/u/simi)\
**Post date:** [August 19, 2008, 10:40am UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219/2 "2008-08-19T10:40:56Z")

</div>

Hi Simi,

The apache and mogrel cluster should work fine with multiple apps. I  
have been running with 2 apps and 6 mongrel instances.

I think your Apache configuration is convoluted. What versions are  
you using?

Check this for a good explanation of virtual hosts:  
[http://articles.slicehost.com/2008/4/29/ubuntu-hardy-apache-virtual-hosts-1](http://articles.slicehost.com/2008/4/29/ubuntu-hardy-apache-virtual-hosts-1)

It may not directly apply, but it should be a good start. Otherwise  
we’ll need more info to answer your question.

-HT

On Aug 19, 12:12 am, Simi Lc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![simi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@simi](https://www.ruby-forum.com/u/simi)\
**Post date:** [August 19, 2008, 11:42am UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219/3 "2008-08-19T11:42:28Z")

</div>

Hi Hugh,

Thank you for your prompt reply.

The problem is fixed now.

Actually the problem was I had the ServerName as [mydomain.com](http://mydomain.com) instead of  
[www.mydomain.com](http://www.mydomain.com) in app.conf

Since the ServerName of other app, that is the admin app was  
[administrator.mydomain.com](http://administrator.mydomain.com), apache could not serve both the apps  
simultaneously. It just served whichever app was first included in  
httpd.conf

I think it is a very minor problem I should have taken care of. But  
sorry I’m a newbie to apache configuration

Thanks,  
Simi

On Aug 19, 12:12ï¿½am, Simi Lc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![simi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@simi](https://www.ruby-forum.com/u/simi)\
**Post date:** [August 19, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219/4 "2008-08-19T18:24:14Z")

</div>

You are welcome, glad to hear you got it working.  
-ht
