Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual Hosting with Bind 9.2.2

Status
Not open for further replies.

bkesting

IS-IT--Management
Apr 14, 2003
180
US
Hello,

I am currently running BIND 9.2.2 and am trying to setup a virtual host. I already own and run domain1.com and it is fine. I want to host a website for my friend who has purchased domain2.com. I have setup Apache with name-based virtual hosts to accomodate this, but I am not sure how to setup DNS for name-based virtual hosting. In my named.conf file i have an entry for domain2.com and declared it as type "master". Do I edit the zone file for domain1.com and enter domain2.com info there or do I make a whole new zone file for domain2.com? ANy help would be appreciated.

Thanks.
 
Domain2.com needs it's own zone file.

Chris.


**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
So do I setup the 2nd zone file identical to the first....obviously replacing all references to domain1 with domain2.

In my original domain I have the namerserver setup as ns.domain1.com.........do I setup in the second zone file a statement in the regards of ns.domain2.com?

Thanks.
 
You would set up a zone file for domain2.com but the name server would be ns.domains1.com (presuming that it is the authorative name server for the domain).

Chris.


**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
So if I set up a new zone for domain2.com and reference the name server as ns.domain1.com......is there anywhere in domain1 zone's file that I make any reference to domain2?
 
No.



**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
I must have something wrong yet....I know it takes several days for DNS servers around the globe to know the change, but my local server should be able to resolve the 2nd domain already right?

Here is my original domain1.com zone file:

$ORIGIN .
$TTL 43200
domain1.com IN SOA ns.domain1.com. root.domain1.com. (
2003010612 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
NS ns.domain1.com.
A xxx.xxx.xxx.xxx
MX 5 mail.domain1.com.
$ORIGIN domain1.com.
mail A xxx.xxx.xxx.xxx
ns A xxx.xxx.xxx.xxx
www A xxx.xxx.xxx.xxx

It works fine, now my zone file for the new domain (domain2.com) is:

$ORIGIN .
$TTL 43200
domain2.com IN SOA ns.domain1.com.
root.domain2.com. (
2003010612 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
@ IN NS ns.domain1.com.
@ IN A xxx.xxx.xxx.xxx
$ORIGIN bussphotography.com.
www A xxx.xxx.xxx.xxx


In both files, xxx.xxx.xxx.xxx refers to the same IP address. Also, I have both domains referenced in named.conf as masters.

Anyone see my problem?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top