[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Multiple Domains with Single Virtual Host



The way I know it is to create two virtual sites, say which ends up
providing:

/home/sites/site1/web --> domain.com this is what actually contains your
site files
/home/sites/site1/web --> domain.co.uk this is the 2nd domain which is emtpy

Open up and edit the httpd.conf file to change the document root for the 2nd
domain.

i.e. DocumentRoot for the .com is /home/sites/site1 and the DocumentRoot for
the .co.uk is /home/sites/site2.

All you have to do is change the DocumentRoot for the .co.uk to
/home/sites/site2 IE. the .com site.

Obviously replace site1 and site2 with the actual site#'s

Hope this helps,

Ian



--> -----Original Message-----
--> From: cobalt-users-admin@xxxxxxxxxxxxxxx
--> [mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Reid Ivens
--> Sent: 14 January 2002 15:35
--> To: cobalt-users@xxxxxxxxxxxxxxx
--> Subject: [cobalt-users] Multiple Domains with Single Virtual Host
-->
-->
--> Hi folks,
-->
--> I've setup a virtual site that I want two domains to point to
--> by adding two
--> ServerAlias lines in the httpd.conf to point the second domain
--> to the first.
--> When I go to the site using the second domain though, the URL
--> changes to the
--> main domain name.  Ideally, I'd like the URL to remain as
--> entered.  I assume
--> it's the webserver's Rewrite engine that is changing the URL,
--> but I don't
--> know how to keep that from happening.  Can anyone offer some
--> help on this
--> issue?
-->
--> Here is how my httpd.conf setup for the domains looks:
-->
--> <VirtualHost 64.27.97.110>
--> ServerName www.domain1.com
--> ServerAdmin admin
--> DocumentRoot /home/sites/site35/web
--> ServerAlias domain1.com
--> ServerAlias domain2.com
--> ServerAlias www.domain2.com
--> RewriteEngine on
--> RewriteCond %{HTTP_HOST}                !^64.27.97.110(:80)?$
--> RewriteCond %{HTTP_HOST}                !^www.domain1.com(:80)?$
--> RewriteRule ^/(.*)                      http://www.domain1.com/$1 [L,R]
--> RewriteOptions inherit
--> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site35/users/$1/web/$3
--> AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site35/users/$1/web/$3
--> </VirtualHost>
-->
--> Thanks,
--> Reid Ivens
-->
--> -------------------------------------------------------------------
--> Reid Ivens, CIO			mailto:reid@xxxxxxxxxxxxxx
--> N-VisionIT Interactive		http://www.n-visionit.com
--> Tel: 613-282-8293			Fax: 425-963-2118
-->
--> _______________________________________________
--> cobalt-users mailing list
--> cobalt-users@xxxxxxxxxxxxxxx
--> To Subscribe or Unsubscribe, please go to:
--> http://list.cobalt.com/mailman/listinfo/cobalt-users