Many years ago I managed to do this successfully, but don't have any documentation on details. I think it was back in the days of Bind 8 and Apache1, so many things have changed.
As I recall, Bind must be properly setup with all the domain names as zones before Apache can switch to the appropriate virtual server.
Documentation on this process is hard to come by, as Bind tutorials all seem to focus on other topics.
I know Bind is very fussy about syntax, etc. so I must have done something wrong somewhere.
Here is what I've created so far in the named.conf.local file:
Code:
zone "xyz.net" {
type master;
file "/etc/bind/zones/xyz.net.db";
};
zone "abc.com" {
type master;
file "/etc/bind/zones/abc.com.db";
};
zone "bcd.org" {
type master;
file "/etc/bind/zones/bcd.org.db";
};
zone "1.1.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.1.1.10.in-addr.arpa";
};
I made a xyz.net.db file that looks like this:
Code:
; BIND data file for xyz.net
;
$TTL 14400
@ IN SOA ns1.xyz.net. tuv.xyz.net. (
201505061 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
60480) ; Default TTL
;
xyz.net. IN NS ns1.xyz.net.
xyz.net. IN NS ns2.xyz.net.
xyz.net. IN MX 10 mail.xyz.net.
xyz.net. IN A 10.1.1.33
ns1 IN A 10.1.1.33
ns2 IN A 10.1.1.33
www IN CNAME xyz.net.
mail IN A 10.1.1.33
ftp IN CNAME xyz.net.
xyz.net. IN TXT "V=spf1 ip4:10.1.1.33 a mx ~all"
mail IN TXT "V=spf1 a -all"
And the file bcd.org.db that looks like this:
Code:
; BIND data file for bcd.org
;
$TTL 14400
@ IN SOA ns1.xyz.net. tuv.xyz.net. (
201505061 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
60480) ; Default TTL
;
bcd.org. IN NS ns1.xyz.net.
bcd.org. IN NS ns2.xyz.net.
bcd.org. IN MX 10 mail.bcd.org.
bcd.org. IN A 10.1.1.33
ns1 IN A 10.1.1.33
ns2 IN A 10.1.1.33
www IN CNAME xyz.net.
mail IN A 10.1.1.33
ftp IN CNAME bcd.org.
xyz.net. IN TXT "V=spf1 ip4:10.1.1.33 a mx ~all"
mail IN TXT "V=spf1 a -all"
Is there some other file someplace else that needs to be modified?
Is there some switch in Apache that must be set?
Bookmarks