Hi all,
I have one rails app running on this setup:
- Centos
- nginx
- a mongrel_cluster
Setting up virtual hosts with nginx is easy enough, but I’d like to
point different hosts to different controllers. For example, I have
http://www.domain1.com which follows the normal index routing and goes
to a controller named ‘controller1’ according to my Rails routes and
works perfectly. But I also have http://www.domain2.com and I’d like
this to go to a controller named ‘controller2’. This way I would have
one app, same site, but different landing pages depending on which
domain name you use to visit the site.
I already tried the request_routing plugin by Dan W. which lets me
handle all of this right in the Rails routes, which I love and works
great, but I imagine it has to be a performance hit. This site will
have thousands of visitors a day so performance is a concern.
Thanks in advance for any suggestions/recommendations.
Raul