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

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



On Mon, 14 Jan 2002, Reid Ivens wrote:
> 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>
> 
Try commenting these out and reload httpd
/etc/rc.d/init.d/httpd reload (RaQ3 or 4)
/etc/rc.d/init.d/httpd.init reload  (RaQ2)

--
Gerald Waugh
Registered Linux User 255245
get registered at http://counter.lt.org/enter-person.php