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.
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.
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
Hi,
if you use Apache Webserver and PhusionPassenger you can take a look her:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#working_with_apache_conf
I use multiple virtual hosts with apache2 and phusion passenger for that problem. Works fine.
Norm
Thank you!
Let me check with apache2 and puhsion passenger. Thanks again!