# Is it possible to have nested rails apps for completely different sites?

**URL:** <https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338>\
**Category:** rubyonrails-talk\
**Created:** [February 26, 2007, 3:50pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338 "2007-02-26T15:50:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_M](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Matt\_M](https://discuss.rubyonrails.org/u/Matt_M)\
**Post date:** [February 26, 2007, 3:50pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338/1 "2007-02-26T15:50:41Z")

</div>

OK,

I have a host (A2 Hosting) that allows me to point different domains at sub-folders for sub-domain hosting. I'd like to be able to run diferent rails apps in each of those folders and one in the root also. I figure I just need to make sure that the first url framgment never has the name of a sub-folder/site set as a route name.

Any advice for me? It's Mongrel and I seriously don't know much about that. Is this even possible?

- matt

---

<div class="post-metadata">

**Author:** ![Luke\_Ivers](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@Luke\_Ivers](https://discuss.rubyonrails.org/u/Luke_Ivers)\
**Post date:** [February 26, 2007, 4:17pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338/2 "2007-02-26T16:17:43Z")

</div>

I don’t think it would be a problem to use a subdomain-name as a route:

If someone hits [bob.mysite.com](http://bob.mysite.com), the host will route the web-request to the application at /bob

If someone hits [www.mysite.com/bob](http://www.mysite.com/bob), it will route the request to the application at , and pass /bob to the routing mechanism.

I don’t see where you’re going to run into routing problems.

---

<div class="post-metadata">

**Author:** ![Matt\_M](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Matt\_M](https://discuss.rubyonrails.org/u/Matt_M)\
**Post date:** [February 26, 2007, 9:16pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338/3 "2007-02-26T21:16:23Z")

</div>

I see. One thing I just realized... the subdomain are setup differently on this server. They're, well not really sub-domains but add-ons. The server name is completely different (not a sub.parent type name). A2 Hosting says to use ln -s rails-app/public public\_html, does that seem like the best way to deploy this? Using links in this setup could be a problem no?

Thanks for your help,

matt

---

<div class="post-metadata">

**Author:** ![Luke\_Ivers](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@Luke\_Ivers](https://discuss.rubyonrails.org/u/Luke_Ivers)\
**Post date:** [February 26, 2007, 9:27pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338/4 "2007-02-26T21:27:09Z")

</div>

Not sure, I have no experience with deployment of this nature. The only advice I can give you is to try out the Rails Deployment group/list/forum… it can be found online at[http://www.ruby-forum.com/forum/23](http://www.ruby-forum.com/forum/23)

---

<div class="post-metadata">

**Author:** ![Matt\_M](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Matt\_M](https://discuss.rubyonrails.org/u/Matt_M)\
**Post date:** [February 26, 2007, 9:29pm UTC](https://discuss.rubyonrails.org/t/is-it-possible-to-have-nested-rails-apps-for-completely-different-sites/9338/5 "2007-02-26T21:29:43Z")

</div>

Thank you.

Matt
