Tuesday, December 17, 2013

[Rails] Re: sub domain + different rails application

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

On Tuesday, 17 December 2013 11:45:05 UTC+5:30, saravanan p wrote:
Hello friends,

Is there any way to implement the subdomain i.e two more rails application, but main domain is same. 
Ex: 

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

Please guide me.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b665c034-222f-4d8a-8462-6c83fd06dc26%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate