apache-dns cname-vhost
I am a newbie administrator and I'm in the process of upgrading(fixing) our
current dns setup. Right now there is a dns forward zone set up for each
virtual host. After reading some docs on apache.org and the dns and bind
book it seems I could get away with just using cname records. Is it correct
to assume I could do something like this:
/etc/named.conf:
zone "hosted-sites" {
type master;
file "/etc/bind/hosted-sites";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
/etc/bind/hosted-sites:
$ttl 38400
our.real.domain. IN SOA our.real.domain. postmaster.our.real.domain. (
988654756
10800
3600
432000
38400 )
our.real.domain. IN NS ns.our.real.domain.
our.real.domain. IN A 192.168.1.100
// aliases for vhosts
vhost1.com. IN CNAME our.real.domain.
www.vhost1.com. IN CNAME our.real.domain.
vhost2.com. IN CNAME our.real.domain.
www.vhost2.com. IN CNAME our.real.domain.
vhost3.com. IN CNAME our.real.domain.
www.vhost3.com. IN CNAME our.real.domain.
/etc/bind/db.192.168.1:
$ttl 38400
1.168.192.in-addr-arpa. N SOA our.real.domain. postmaster.our.real.domain. (
988654756
10800
3600
432000
38400 )
100. IN NS ns.our.real.domain.
100 IN PTR our.real.domain.
And then just let apache handle the name based vhosts? Is it really
necessary to have a seperate zone file for each vhost?
TIA,
Jesse
Reply to: