[lug] all CNAME'd domain dns troubles

Michael J. Pedersen marvin at netinfra.net
Wed Jan 19 22:57:15 MST 2000

On Wed, Jan 19, 2000 at 04:05:14PM -0700, Andrew Diederich wrote:
> I've looked about in DNS and Bind 2nd edition a bit, but haven't found what
> I need.  My company owns several domain names, but I want them all to point
> to the same servers.  Example: if you go to www.netdelivery.com and
> www.movia.com they should go to the same server.  I'm using Bind 4.9 on a
> SuSE 6.3 box.  

Well, having read the information you posted, and another individual's reply,
you're all pretty well on the money.  Separate zone files for each domain will
correct 90% of your problems.

However, if you have a need to have the program on the same server
differentiate between what is being asked for, you've got a whole separate can
of worms to deal with.

For instance, consider www.netdelivery.com and www.movia.com.  If they both
point to the same IP address, and apache tries to figure out what to do with
this, then both of them have to have the same web pages.  In other words, the
only difference the user of the web pages can see is that one of them has a
URL of http://www.netdelivery.com, and the other has a URL of
http://www.movia.com.  The pages will be identical.

This is not due to a failing of the apache, but rather the way the internet
itself works.  When you make a request of your web browser to open up
www.netdelivery.com, it actually performs these steps:

1. Contact a DNS server
2. Get the IP address from the DNS server for www.netdelivery.com
3. Contact that IP address
4. Download the page and related information
5. Display the page
(This list is very condensed)

Now, if your two web sites point to the same IP address, then apache (which is
listening on that IP address), will see the request as being for that IP
address, and serve up the same set of web pages, regardless of what the user
typed in.

The solution is to use IP aliasing (there's a HOWTO on it, check /usr/doc on
your linux box). This will allow you to assign multiple IP addresses to the
same ethernet card.  Now, apache will see requests coming in on different IP
addresses. One of those IP addresses will be for www.netdelivery.com, and the
other will be for www.movia.com.  Now apache can serve up different pages for
those two domains, even though they are both running from the same apache from
the same physical machine.

I know that this explanation will seem kind of weird at first, but feel free
to ask me to clarify (ideally, with specific questions as to what doesn't make
sense) either to me off the list, or ask in general on the list.  You'll get
the answers (assuming you need or want them :).

Key point, though: Different IP addresses for each domain will make the
domains work more smoothly.

Michael J. Pedersen
WhoDP: whodp://earth.activerse.com/pedersen
Check out Ding! at http://www.activerse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20000119/c69c5940/attachment.pgp>

More information about the LUG mailing list