second try.. no replies

Igmar Palsenberg maillist at chello.nl
Sat Nov 11 14:13:14 UTC 2000


On Sat, 11 Nov 2000, Mark R. Nathan wrote:

> 
> Thanks for reading.
> 
> I am having trouble redirecting virtual domains that do not start 
> with www to another host location.
> 
> miraboo.com DNS is on my BSD server locally (dns1.miramat.com) but I 
> have it redirecting to CNAME www.miraboomusic.com.  This setup works 
> but when I type in http://miraboo.com it redirects to 
> http://www.miramat.com . I have tested several changes and nothing is 
> working.
> 
> Would someone please look at my zone data below and kick my brain in a little?

<snip zonefile>

Your problem is you (apache) virtual host setup, not your DNS.

Take the following situation :

www.x.com	CNAME	www.y.com

If the browser calls www.x.com, it looks up the IP (end it ends up with
the IP from www.y.com), but sends a Server: www.x.com to the apache at the
other site.

If apache doesn't find www.x.com in it's config, it presents the first
virtual domain it finds in it's config.

In your case, you need a 

<VirtualHost x.x.x.x>
	ServerName	www.x.com
	bla
	bla
</VirtualHost>

in your config. DO use an IP, NOT a name. 

The better way to handle this situation is to let Apache do the redirect,
not abuse the DNS.




	Igmar





More information about the bind-users mailing list