# Virtual Hosts?

**URL:** <https://www.ruby-forum.com/t/virtual-hosts/89147>\
**Category:** Rails\
**Created:** [January 4, 2006, 12:32am UTC](https://www.ruby-forum.com/t/virtual-hosts/89147 "2006-01-04T00:32:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [January 4, 2006, 12:32am UTC](https://www.ruby-forum.com/t/virtual-hosts/89147/1 "2006-01-04T00:32:55Z")

</div>

Well, I guess I’m successful because within a month of getting my very  
first  
application online (and it’s barely functional) I now have to get a  
second  
one up pretty quickly.

Basically, I have a rails application “myFirstApp”, and a hostname  
[www.myfirstapp.com](http://www.myfirstapp.com). Now I have a second rails app “mySecondRailsApp”  
and I  
need [www.mysecondapp.com](http://www.mysecondapp.com) to peacefully coexist on the same box.

I’ve looked through the rails wiki and I know I need virtual hosting. I  
see  
one page that discusses this with apache and I might be able to muddle  
through it. Currently I’m using WEBrick and I’m a big fan of not  
changing  
things unless I have to. Can this be done well with WEBrick or should I  
make the switch to ?Apache?

Server load is not an issue. Both sites are low traffic.

Thanks,

Gary

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [January 4, 2006, 12:45am UTC](https://www.ruby-forum.com/t/virtual-hosts/89147/2 "2006-01-04T00:45:28Z")

</div>

Gary,

Still working on my first app on a test server, but it needs to go onto  
a  
production system as well. I use vhosts on the production environment,  
having  
it all directed by apache2.

What I’m planning on doing (read: trying/testing). Is have an apache  
daemon  
function as a proxy and redirect stuff to a lightweight daemon  
internally to  
another port for the rails apps.

Proxy stuff:  
[http://www.realityforge.org/articles/2005/11/30/proxy\_to\_lighttpd](http://www.realityforge.org/articles/2005/11/30/proxy_to_lighttpd)  
[http://brainspl.at/articles/2005/11/08/apache-vhost-to-proxy-thru-to-lighttpd-on-a-higher-port](http://brainspl.at/articles/2005/11/08/apache-vhost-to-proxy-thru-to-lighttpd-on-a-higher-port)

And scgi is optimized for use with Rails:  
[http://www.zedshaw.com/projects/scgi\_rails/index.html](http://www.zedshaw.com/projects/scgi_rails/index.html)

Regards,

Gerard.

On Wednesday 04 January 2006 00:30, Gary H. tried to type  
something  
like:

> through it. Currently I’m using WEBrick and I’m a big fan of not changing
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!
