Config multiple domains on one IP address

Joseph S D Yao jsdy at cospo.osis.gov
Wed Jul 12 00:58:20 UTC 2000


On Wed, Jul 12, 2000 at 12:23:49AM +0000, symbolicJ!M wrote:
> Hello everybody,
> 
> I've taken the advice I constantly find here, and have wasted my money
> on DNS & BIND... my network has almost nothing in common with their
> example scenario, but I did get some useful background information, and
> a general sense of amazement that this protocol makes the 'Net go round.
> 
> That said, hopefully now I have some clear, concise questions that can
> be answered easily by someone who has already eaten the magic beans...
> 
> My situation I have one machine, which is configured with two IP
> addresses. The host is server.mydomain.com with an IP of
> 111.222.333.253, a second IP is bound to eth0 111.222.333.252 and is
> named NS1.mydomain.com. I have registered my nameserver with my
> registrar, and updated mydomain.com's whois to use my NS1.mydomain.com
> address and IP to handle DNS resolution.
> 
> It is my desire to use Apache 1.3.12 to use NameVirtualHost to host
> multiple domains on the single 111.222.333.253 IP address. Within the
> httpd.conf file it seems very straightforward, and I believe that part
> of my configuration is correct. The DNS portion continues to baffle me.
> 
> I want to point all requests for *.mydomain.com, *.mydomain.net,
> *.seconddomain.com, and *.thirddomain.com at the 111.222.333.253 IP to
> allow Apache to parse the requests properly. After reading DNS&BIND, my
> db.mydomain looked like this:
> 
> mydomain.com IN SOA .... (blah blahblah)
> 
> mydomain.com IN NS NS1.MYDOMAIN.COM
> 
> localhost.mydomain.com IN A 127.0.0.1
> server.mydomain.com    IN A 111.222.333.253
> ns1.mydomain.com       IN A 111.222.333.252
> 
> mydomain.com           IN A 111.222.333.253
> www.mydomain.com       IN A 111.222.333.253
> *.mydomain.com         IN A 111.222.333.253
> 
> mydomain.net           IN A 111.222.333.253
> www.mydomain.net       IN A 111.222.333.253
> *.mydomain.net         IN A 111.222.333.253
> 
> seconddomain.com       IN A 111.222.333.253
> www.seconddomain.com   IN A 111.222.333.253
> *.seconddomain.com     IN A 111.222.333.253
> 
> ...etc.
> 
> Didn't work. As far as I could tell. No satisfaction from Netscape,
> NSLOOKUP and ping puked on reqeuests for mydomain.com.
> 
> After scouring the newsgroups again, I changed my A records (aside from
> the first two of course) to CNAME like:
> mydomain.com           IN CNAME server.mydomain.com.
> www.mydomain.com       IN CNAME server.mydomain.com.
> *.mydomain.com         IN CNAME server.mydomain.com.
> 
> Yes, I changed the serial number in db.mydomain, and restarted named.
> 
> What is the correct syntax here?
> If I have the wildcard *, do I really need the other entries?

ISTM that this is covered in D&B, albeit perhaps not all at once.

The "*" syntax is correct.  Either the A records or the CNAME records
will do, no big deal.  The *.domain... wildcards will match
www.domain..., but not domain....

And using those aliases in your posting means that nobody can go and
test what the problem actually is.  So you probably aren't going to be
able to get any help.

My only suggestion is that you make sure that the .COM name servers are
actually pointing at your name server, and not somewhere else, for your
domains.

-- 
Joe Yao				jsdy at cospo.osis.gov - Joseph S. D. Yao
COSPO/OSIS Computer Support					EMT-B
-----------------------------------------------------------------------
This message is not an official statement of COSPO policies.



More information about the bind-users mailing list