Forum: Ruby on Rails sub domain + different rails application

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!
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.