Forum: Ruby on Rails sub domain + different rails application

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1c8a5d8dea6c3e1739f75263687528a2?d=identicon&s=25 saravanan p (Guest)
on 2013-12-17 08:19
(Received via mailing list)
Hello friends,

Is there any way to implement the subdomain i.e two more rails
application,
but main domain is same.
Ex:
rails1.mainsite.com
rails2.mainsite.com
rails3.mainsite.com
rails4.mainsite.com

Note: its not a single rails application.
I am using rails 4, ruby 2.0

Please guide me.
Cf13bff4ec800cf3f78f0259f4df0ad7?d=identicon&s=25 ThoWac (Guest)
on 2013-12-17 12:20
(Received via mailing list)
Hi,

if you use Apache Webserver and PhusionPassenger you can take a look
her:

http://www.modrails.com/documentation/Users%20guid...


Am Dienstag, 17. Dezember 2013 07:15:05 UTC+1 schrieb saravanan p:
Fb1d21e582835b53a7b19ffa7b6df6cb?d=identicon&s=25 Karthik Sirasanagandla (Guest)
on 2013-12-17 12:21
(Received via mailing list)
Use a webserver like nginx to route traffic to different rails
application.

Sample config in nginx can be as below:
*server {*
*  # Subdomain*
*  listen 80;*
*  server_name subdomain1.domain.com;*
*  location / {*
*    proxy_pass http://127.0.0.1:8000/;*
*  }*
*}*
*server {*
*  # Subdomain*
*  listen 80;*
*  server_name subdomain2.domain.com;*
*  location / {*
*    proxy_pass http://127.0.0.1:8888/;*
*  }*
*}*

Cheers and good luck!
Karthik
46f52c33235283752423837b91c581dd?d=identicon&s=25 Norm Scherer (Guest)
on 2013-12-17 17:22
(Received via mailing list)
I use multiple virtual hosts with apache2 and phusion passenger for that
problem.  Works fine.

Norm
1c8a5d8dea6c3e1739f75263687528a2?d=identicon&s=25 saravanan p (Guest)
on 2013-12-18 11:19
(Received via mailing list)
Thank you!

Let me check with apache2 and puhsion passenger. Thanks again!
This topic is locked and can not be replied to.