*BSD News Article 48987


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!vtc.tacom.army.mil!news1.oakland.edu!newsxfer.itd.umich.edu!agate!howland.reston.ans.net!newsfeed.internetmci.com!news.sprintlink.net!in1.uu.net!news.leonardo.net!mac214.admin.biola.edu!user
From: davidp@leonardo.net (David Pisoni)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: How to host virtual domain via DNS?
Date: Wed, 16 Aug 1995 13:42:17 -0700
Organization: Leonardo Internet
Lines: 60
Message-ID: <davidp-1608951342170001@mac214.admin.biola.edu>
References: <40mbif$o2g@news.wco.com>
NNTP-Posting-Host: mac214.admin.biola.edu

In article <40mbif$o2g@news.wco.com>, larry@netcom.com wrote:

>I am trying to host multiple virtuals domains on one BSDI v2.0 PC.  I
have setup multiple IP addresses via ifconfig and route.  I
>have also loaded Plexus to host the www documents.  This all works just
fine for my local domain. 
>
>What I don't know how to do is that once a new virtual domain is
registered with the InterNIC, how do I setup my primary and 
>secondary name servers to host another domain?  I am using the BSDI named
sysetem, that is configured to use /etc/namedb
>files: domain.db, etc.  Since I can only have one SOA record in each
file, how do I resolve multiple domains?  
>
>Any help will be greatly appreciated.
>
>Thanks in advance,
>
>--Larry Tusoni
>+1 209 736 0111
>larryt@netcom.com

Actually, I just found an easy way to set this up for several 'virtual' domains.
Have 'named.boot' enter a 'primary' for the said domain.
In that file, have it use a '@ SOA' record, referring though to your domain.
Make that domain (still under '@') a CNAME to your server.

In this way, you can have all your 'virtual' domains point to the same file!

Here is how it looks on our system:

@       IN      SOA     leonardo.net. hostmaster.leonardo.net. (
                                9508141 ; Serial number
                                172800  ; Refresh every 2 days
                                3600    ; Retry every hour
                                1728000 ; Expire every 20 days
                                172800 ); Minimum 2 days
                IN      NS      leonardo.net.
                IN      NS      donatello.leonardo.net.
                IN      MX      10 leonardo.net.
                IN      CNAME   leonardo.net.
;
; Local loopback host
localhost       IN      A       127.0.0.1
;
; Canonical Names
www             IN      CNAME   leonardo.net.

--

So you would add an entry to your named.boot:
primary     virtualdomain.com    thisfile.db
(where thisfile.db is the example I gave above, customized to your system)

This system has worked perfectly for us, we have several 'virtual' domains.
+--------------------------------------------------------------+
| David Pisoni                             davidp@leonardo.net |
| System Administrator                   david@isaac.biola.edu |
| Leonardo Internet             http://www.ac.biola.edu/~david |
+--------------------------------------------------------------+