Can xx.com and www.xx.com stand for different app?

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?

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

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

On Oct 31, 2006, at 9:23 AM, Fred wrote:

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

You would want to split that into two blocks:

<VirtualHost …>
ServerName xx.com

<VirtualHost …>
ServerName www.xx.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs