[Xitami] VHost CNAME path question
Brian {Hamilton Kelly}
xitami@lists.xitami.org
Tue, 26 Oct 2004 22:54:59 +0100 (BST)
In message <5.1.1.6.0.20041026141828.00b3b838@mail.mrjdesign.com>
admin writes:
> I have different domain names specified in the Vhost section done.
> That works fine as long as the domain name is different.
>
> when I add a CNAME named OTHER to the OTHER.MYDOMAIN.COM
>
> then OTHER.MYDOMAIN.COM and MYDOMAIN.COM still go to the same site.
OK, ignore my earlier reply (written Tues am, but only recently
uploaded). I now understand better what your problem is.
When you add a CNAME RR to your domain, then anything encountering that
record will in turn ask to resolve the IP address for the "canonical
name" to which you've just pointed. Therefore, by the time the web
browser issues its request, it will have that canonical name in its Host:
header line, and not the original name.
The answer is NOT to use CNAME; instead, provide a separate A record,
pointing to the same IP address as the other host(s); the HTTP request
will now include the original other.mydomain.com in its headers.
> They shouldn't.
They will; that's how CNAMEs work.
--
Brian {Hamilton Kelly} bhk@dsl.co.uk
"I don't use Linux. I prefer to use an OS supported by a large multi-
national vendor, with a good office suite, excellent network/internet
software and decent hardware support."