# Mongrel + Lighty + Multiple Rails Apps : How to Route?

**URL:** <https://www.ruby-forum.com/t/mongrel-lighty-multiple-rails-apps-how-to-route/84792>\
**Category:** Rails\
**Created:** [March 21, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/mongrel-lighty-multiple-rails-apps-how-to-route/84792 "2006-03-21T18:13:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![churp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@churp](https://www.ruby-forum.com/u/churp)\
**Post date:** [March 21, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/mongrel-lighty-multiple-rails-apps-how-to-route/84792/1 "2006-03-21T18:13:46Z")

</div>

Hello all,

I’m using Lighty-Win32 and Mongrel. I have one rails app working  
against  
[http://hostname/](http://hostname/). I want to know how to route lighty and my app to  
[http://hostname/appname1](http://hostname/appname1). I have multiple apps that I would eventually  
want  
to route with [http://hostname/appname2](http://hostname/appname2), [http://hostname/appname3](http://hostname/appname3), etc.  
I am  
not trying to “productize”, these are separate distinct apps that I’m  
trying  
to serve from the same host. If subdomaining is a better solution,  
please  
explain.

Thank you all for your help!

–

---

<div class="post-metadata">

**Author:** ![churp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@churp](https://www.ruby-forum.com/u/churp)\
**Post date:** [April 11, 2006, 1:37am UTC](https://www.ruby-forum.com/t/mongrel-lighty-multiple-rails-apps-how-to-route/84792/2 "2006-04-11T01:37:00Z")

</div>

I have not tried this with lighty but I imagine the problem might be  
session  
related. It seems to set the session scope via the hostname and so if  
you  
are doing authetication, separate domains might be safer. Otherwise, you  
might have user id 1 in one app take user id 1 in another app. If they  
are  
separate domains, then the cookie is different and the sessions cannot  
be  
shared.

If I am wrong here, I would love to be corrected but I am reasonably  
sure  
this is how it works.
