I use apache and mongrel_cluster to deploy my multi rails application,now i have a domain name of xx.com,however i want to use this domain name for my two application,that is,http://xx.com for rails application one and http://www.xx.com for rails application two, Can this requirement be satisfied? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
ethan wrote:> I use apache and mongrel_cluster to deploy my multi rails > application,now i have a domain name of xx.com,however i want to use > this domain name for my two application,that is,http://xx.com for rails > application one and http://www.xx.com for rails application two, Can > this requirement be satisfied?I believe you can do this with apache''s virtual hosts, it certainly allows you to have xxx.yyy.com and zzz.yyy.com pointing at separate rails apps. Fred -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Oct 31, 2006, at 9:23 AM, Fred wrote:> > ethan wrote: >> I use apache and mongrel_cluster to deploy my multi rails >> application,now i have a domain name of xx.com,however i want to use >> this domain name for my two application,that is,http://xx.com for >> rails >> application one and http://www.xx.com for rails application two, Can >> this requirement be satisfied? > > I believe you can do this with apache''s virtual hosts, it certainly > allows you to have xxx.yyy.com and zzz.yyy.com pointing at separate > rails apps.That is correct. Typically you would have one VirtualHost block: <VirtualHost ...> ServerName xx.com ServerAlias www.xx.com ... </VirtualHost> You would want to split that into two blocks: <VirtualHost ...> ServerName xx.com </VirtualHost> <VirtualHost ...> ServerName www.xx.com </VirtualHost> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
ethan wrote:> I use apache and mongrel_cluster to deploy my multi rails > application,now i have a domain name of xx.com,however i want to use > this domain name for my two application,that is,http://xx.com for rails > application one and http://www.xx.com for rails application two, Can > this requirement be satisfied?I think this is what youre looking for. http://svn.vivabit.net/external/rubylibs/request_routing/ This example from errtheblog states: map.connect '''', :controller => ''mobile'', :conditions => { :subdomain => ''m'' } Read this post for more: http://errtheblog.com/post/35 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---