# Managing multiple rails applications with apache

**URL:** <https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764>\
**Category:** Rails\
**Created:** [March 2, 2009, 8:27am UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764 "2009-03-02T08:27:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 8:27am UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/1 "2009-03-02T08:27:14Z")

</div>

how can manage multiple rails applications with apache

i have followed the following tutorial and successfullt set up my  
rails site using apache

[http://www.howtoforge.com/ruby\_on\_rails\_debian\_etch](http://www.howtoforge.com/ruby_on_rails_debian_etch)

> **[Using Ruby On Rails With Apache2 On Debian Etch - Page 2 - Page 2](https://www.howtoforge.com/ruby_on_rails_debian_etch_p2)**
>
> Using Ruby On Rails With Apache2 On Debian Etch 
> 
> This article shows how you can install Ruby on Rails (RoR)
> and integrate it in Apache2 on a Debi... - Page 2

but how can i configure apache to host more than one rails site ?

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 10:12am UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/2 "2009-03-02T10:12:55Z")

</div>

I wrote a little about this here:

> **[Mongrel, Apache, and Rails](http://skandragon.blogspot.com/2007/10/mongrel-apache-and-rails.html)**
>
> When I first started running Rails applications on my web server, I chose to use FastCGI. Specifically, the mod\_fcgid module, which had som...

How to set up Apache for multiple hosts (assuming no SSL) is pretty  
easy, and well-documented in many, many places. Search for “apache  
virtual host configuration” or similar. How to do it with SSL is even  
easier, but burns one real IP address per host.

–Michael

On Mon, Mar 2, 2009 at 1:26 AM, — Z@m —  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> >

–  
(Ruby, Rails, Random) blog: [http://skandragon.blogspot.com/](http://skandragon.blogspot.com/)

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 11:13am UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/3 "2009-03-02T11:13:25Z")

</div>

Mongrel is a nice piece of software, but you should really have a look  
at  
Phusion Passenger. It effectively makes deployment of Rails  
applications  
as simple as deploying PHP code.

> **[Passenger - Enterprise grade web app server for Ruby, Node.js, Python](https://www.phusionpassenger.com/)**
>
> Passenger is a rock-solid, feature-rich web app server that integrates with Apache and Nginx. Serve millions of customers with confidence

[http://www.modrails.com/documentation/Users%20guide.html#\_installing\_phusion\_passenger](http://www.modrails.com/documentation/Users%20guide.html#_installing_phusion_passenger)  
[http://www.modrails.com/documentation/Users%20guide.html#\_deploying\_a\_ruby\_on\_rails\_application](http://www.modrails.com/documentation/Users%20guide.html#_deploying_a_ruby_on_rails_application)

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 12:04pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/4 "2009-03-02T12:04:37Z")

</div>

Thank you for your fast reply !

regards  
Krishnan

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/5 "2009-03-02T16:11:16Z")

</div>

Phusion Passenger is the easiest (and increasingly better) way:

> **[Phusion Passenger 2.1.1 (beta) released, thanks sponsors!](https://old.blog.phusion.nl/2009/03/01/phusion-passenger-211-beta-released-thanks-sponsors/)**
>
> Phusion Passenger is an Apache module for deploying Ruby on Rails web applications, and is mainly focused on ease of use and stability. The community sponsorship campaign has been a huge succes. We…

Cheers, Sazima

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/6 "2009-03-02T17:39:53Z")

</div>

+1 for Passenger. I’m currently running some Rails apps and a Sinatra  
app as well on the same box. Very easy, very simple, very cool.

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 11:33am UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/7 "2009-03-02T11:33:24Z")

</div>

It’s on my to-do list. Right between rebuilding my Xen server, making  
Asterisk work again, etc. 🙂

–Michael

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/8 "2009-03-02T18:36:28Z")

</div>

The only issue I have with Passenger is the same one I have for any  
apache-module based application: Break into one, and you break into  
them all.

That is, they all run as user www group www (on my box, those can  
vary.) Therefore if applications cross administrative boundaries,  
they must run on different Apache instances. Otherwise, one can read  
another application’s database.yml and the game is over.

That said, I’m the owner of my personal server, and therefore I am a  
single boundry. I’ve started the conversion over to Passenger. One  
down, 5 more to go. Looks trivial, and just works so far. The only  
“site” I have it up on is my soon-to-be personal media database,  
[http://media.flame.org/](http://media.flame.org/) and no, it’s not even close to done yet.

–Michael

On Mon, Mar 2, 2009 at 10:39 AM, Bob M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> >

–  
(Ruby, Rails, Random) blog: [http://skandragon.blogspot.com/](http://skandragon.blogspot.com/)

---

<div class="post-metadata">

**Author:** ![SSZSmSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Post date:** [March 2, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764/9 "2009-03-02T20:31:22Z")

</div>

Michael G. wrote:

> The only issue I have with Passenger is the same one I have for any  
> apache-module based application: Break into one, and you break into  
> them all.
> 
> That is, they all run as user www group www (on my box, those can  
> vary.) Therefore if applications cross administrative boundaries,  
> they must run on different Apache instances. Otherwise, one can read  
> another application’s database.yml and the game is over.

Passenger solves that problem:  
[http://www.modrails.com/documentation/Users%20guide.html#user\_switching](http://www.modrails.com/documentation/Users%20guide.html#user_switching)

> > +1 for Passenger. I’m currently running some Rails apps and a Sinatra
> > 
> > > On Mar 2, 4:26 am, “— Z@m —” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > > 
> > > >

–  
Jack C.  
removed\_email\_address@domain.invalid
