# Multiple rails apps on one lighttpd

**URL:** <https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651>\
**Category:** Rails\
**Created:** [November 23, 2005, 12:46am UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651 "2005-11-23T00:46:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [November 23, 2005, 12:46am UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651/1 "2005-11-23T00:46:28Z")

</div>

Good evening (or afternoon or whatever it is where you are),

Before I start setting it all up, I have a question about lighttpd and  
multiple rails apps. From what I have read, it is at the minute only  
possible to do multiple rails apps using subdomains:  
[typo.mysite.com](http://typo.mysite.com)

> **[00server.com -- $0 setup fee and $0 monthly fee, free web page, free domain...](http://00server.com/)**
>
> 00server.com -- Get a custom domain name that fits your site. Choose from over 20 base domain names (like 00me.com, 00sports.com, 00family.com) and then put your name in front! You also get 20MB of web space, unlimited free web-based e-mail accounts,...

[rforum.mysite.com](http://rforum.mysite.com)  
etc, etc

and not currently possible to do this:  
[mysite.com/typo](http://mysite.com/typo)  
[mysite.com/rforums](http://mysite.com/rforums)  
[mysite.com/hieraki](http://mysite.com/hieraki)

Is this correct??

I read on a thread in textdrive that this will be possbile in lighty  
1.4.8 which is apparently out soon.

Also, does anybody know if it’s possible to do several rails apps as  
above and also have the homne page and some other homegrown pages run by  
rails…

/(index.rhtml from rails)  
/typo  
/rfoums  
/hierarki  
/HomeGrownRailsPages

Thank you.

Matthew Bennett

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [November 23, 2005, 5:24am UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651/2 "2005-11-23T05:24:39Z")

</div>

Matthew wrote:

> Good evening (or afternoon or whatever it is where you are),
> 
> Before I start setting it all up, I have a question about lighttpd and  
> multiple rails apps. From what I have read, it is at the minute only  
> possible to do multiple rails apps using subdomains:  
> [typo.mysite.com](http://typo.mysite.com)  
> [hieraki.mysite.com](http://hieraki.mysite.com)  
> [rforum.mysite.com](http://rforum.mysite.com)  
> etc, etc
> 
> and not currently possible to do this:  
> [mysite.com/typo](http://mysite.com/typo)  
> [mysite.com/rforums](http://mysite.com/rforums)  
> [mysite.com/hieraki](http://mysite.com/hieraki)
> 
> Is this correct??
> 
> I read on a thread in textdrive that this will be possbile in lighty  
> 1.4.8 which is apparently out soon.
> 
> Also, does anybody know if it’s possible to do several rails apps as  
> above and also have the homne page and some other homegrown pages run by  
> rails…
> 
> /(index.rhtml from rails)  
> /typo  
> /rfoums  
> /hierarki  
> /HomeGrownRailsPages
> 
> Thank you.
> 
> Matthew Bennett

Use symbolic links! You would have the applications in their own  
directories, then simply use a symbolic link to make [mydomain.com/rforum](http://mydomain.com/rforum)  
point to /var/www/rforum or wherever else you want. Rails will  
dynamically adjust the urls (you did use link\_to and all the helpers for  
a reason!)

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [November 23, 2005, 8:34am UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651/3 "2005-11-23T08:34:33Z")

</div>

> Use symbolic links! You would have the applications in their own  
> directories, then simply use a symbolic link to make [mydomain.com/rforum](http://mydomain.com/rforum)  
> point to /var/www/rforum or wherever else you want. Rails will  
> dynamically adjust the urls (you did use link\_to and all the helpers for  
> a reason!)

Thanks waloeii, that sounds interesting. Is it as simple as doing:

ln -s /home/username/www/blog/ /home/username/blog/ etc, etc??

Also, how is this represented externally in browsers and to search  
spiders…?? What URI do I use? Do the symlinks mean I can do  
[mysite.com/blog](http://mysite.com/blog) (and this URI continues to appear in the browser) or  
does it redirect to [blog.mysit.com](http://blog.mysit.com)??

I’m coming at this mainly from an SEO perspective: search spiders treat  
subdomains as completely different sites (from a ranking and results  
point of view).

So if you have 1000 incoming links, for example, that all point to  
things like [mysite.com/blog](http://mysite.com/blog), [mysite.com/nextthing](http://mysite.com/nextthing) etcc then all of those  
incoming links count towartds one site and all the content is judged  
together. If however you have 1000 links to three subdomains (blog,  
forums, articles) then that’s going to split your search karma over 3  
sites, even though you know and your visitors know that they’re the same  
one.

Thanks for your suggestion.

Matthew

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [November 24, 2005, 3:21pm UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651/4 "2005-11-24T15:21:52Z")

</div>

Hi Guys,

after doing first steps with rails i?ve a simple question about how  
to best do data-type-conversion from/to forms:

I have a form that accepts data of an Event like: title, time etc.  
This is mapped to a AR model object called Event. Additionally there  
is a field that accepts a comma speparated list of email addresses -  
the people that should be notified. Each email address should be  
converted to a single active record model objects of type  
‘Invitee’ (Event has\_many :invitees).

Now I don’t know where to put the validation and data preperation of  
those email addresses!? In the java world i would have created a  
ProperyEditor. In Rails i could add the comma delimited field as  
additional attribute to the Event model class (where it does not  
really belong, does it?). Or i could put it in the controller by  
using a extra fieldname out of the event context but only have the  
flash for error reporting in this case.

Where would you put it? Any best practices here? I?m a little bit  
lost on this.

Thanks a lot  
Andi\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [November 23, 2005, 11:22pm UTC](https://www.ruby-forum.com/t/multiple-rails-apps-on-one-lighttpd/48651/5 "2005-11-23T23:22:28Z")

</div>

Now solved, lighty 1.4.8 is here. Well done the lighttpd people!!

> **[lighttpd 1.4.8 and multiple rails-apps - lighty's life](http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps/)**
>
> lighttpd 1.4.8 was just released and next to a pile of bugfixes we added a new option to fastcgi.server to allow a simple setup of multiple rails app …
