OK thanks. That was just the little clue I needed to look at the correct documentation for nginx. What I ended up with was the following:
My primary domain has this in it's server portion: server_name www.domain1.com domain1.com; then in the location portion: if (!-f $request_filename) { proxy_pass http://mongrel; break; } And my other domain has the following: server_name www.myblog.com myblog.com; then in the location portion: if (!-f $request_filename) { rewrite ^/ /blog break; proxy_pass http://mongrel; break; } Just a single rewrite line to append the controller name to the original url request. Thanks, Raul On Feb 16, 6:20 am, "Aníbal Rojas" <[EMAIL PROTECTED]> wrote: > Umm, you need to add rewriting so both requests get mapped to the > differente controllers... > > -- > Aníbal > > On Feb 15, 1:06 pm, roller8 <[EMAIL PROTECTED]> wrote: > > > 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 > > havehttp://www.domain1.comwhichfollows the normal index routing and goes > > to a controller named 'controller1' according to my Rails routes and > > works perfectly. But I also havehttp://www.domain2.comandI'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 Webb 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---