DNS for virtual hosts

Barry Margolin barmar at bbnplanet.com
Mon Jun 28 22:39:14 UTC 1999


In article <930602713.333798 at tornado.direct-internet.net>,
Roman Ekjanov  <romane at epiphan.com> wrote:
>
>Hi All!
>I need to setup the bind to support apache virtual hosts. I have only 1 IP
>address on my ISP network, and want it serves as www.domain1.com,
>www.domain2.com, and so on. To complicate the problem I need to have, for
>example, www1.domain3.com and www2.domain3.com and some domains must have MX
>record. All on the same IP address.
>What should I put in zone files?
>What should I put in reverse files? Several PTR records?
>What should my ISP put in his named files to delegate responsibility for
>this address to my name server (yes, it will run on the same single address,
>as weel as MTA for some of domains).
>In other words, I want to manage all my virtual domains by myself and don't
>bother my ISP with such little things.

Pick one of the names, e.g. www.domain1.com, to serve as the primary name,
and install an A record for that name.  Make all the other www.domainN.com
entries be CNAME records pointing to www.domain1.com.  Make the PTR record
point to www.domain1.com.  Make the MX records for all the domains point to
www.domain1.com.

The ISP should put an NS record in their reverse domain file pointing to
your server for your address.  E.g. if their address block were 192.168.10
and they assigned 192.168.10.25 to you, their 10.168.192.in-addr.arpa zone
file would contain:

25  IN NS  www.domain1.com.

On your server you would create a 25.10.168.192.in-addr.arpa zone that
would look something like:

@ IN SOA www.domain1.com.  hostmaster.domain1.com. (
         ... )
  IN NS www.domain.com.
  IN PTR www.domain1.com.

-- 
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list