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

Re: [cobalt-users] redirect



"E.B. Dreger" wrote:

> Don't have CNAMEs point to CNAMEs, either.

Forgot that one, thanks.

> JL> Using a CNAME is a quick and simple solution, and frankly, I like to
> 
> Actually, I used to use CNAMEs more than I do now.  Multiple A
> records pointing to one IP is "officially" a bad idea, but I now
> prefer that over the multiple queries required with CNAMEs.

Personally, since I've understood how DNS works, I always use multiple A
records per IP, even for non-RaQ boxes, just to avoid the multiple
lookups.

> Besides, anything that a CNAME can do, "sed" can too -- unless a
> CNAME points to a host for which I don't do DNS.  (I definitely
> tend to run CNAMEs in this case.)

There are two places I use CNAMEs.  Of course when I have no control
over the IP# of the target machine, as you note above, and for pointing
ftp to www, since what people tend to use ftp for is to upload their
website.  You might call this being obsessive-compulsive, or perhaps
just unnecessary, but my logic is if I'm going to change one I'm going
to change the other.

> JL> think elegant.  But it won't work unless the target URL has it's own
> JL> dedicated IP#.
> 
> Uhhhhh.....
> 
> DNS converts FQHN to IP.  Web browser contacts webserver on that
> IP, and sends request using "Host: " field in header.  Apache
> "ServerName" directive matches host.

Okay, here's what I think I was thinking... if the target URL doesn't
have it's own dedicated IP#, and if the target URL isn't the first site
at that IP#, and if the host field doesnt' match either the ServerName
or one of the ServerAlias directives, the a CNAME resolution will point
to whatever domain is the top one (reading down) in the httpd.conf file
for that IP#.  Since in the Raq the order of virtual sites for an IP#
can change, and since most people forget the ServerAlias, I wrote my
perhaps simplistic warning.

Jeff
-- 
Jeff Lasman <jblists@xxxxxxxxxxxxx>
Linux and Cobalt/Sun/RaQ Consulting
nobaloney.net
P. O. Box 52672, Riverside, CA  92517
voice: (909) 778-9980  *  fax: (702) 548-9484