change domain zonefile location?

apex13

Registered
Nov 18, 2005
1
0
151
Hi,

I just got my first cpanel/whm installation and it seems that all zonefiles are created in the top level /etc/namedb directory, e.g. `domain.com.db'.

Is it possible to change this? I would like to place master zonefiles as `/etc/namedb/master/domain.com'

Thanks!
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
Edit /etc/named.conf using your favorite editor (nano/vi)

Options section in the file should look something like this:
Code:
options {
    ....
    ....
    directory "/etc/namedb/master";
    ....
    ....
}
This would setup your default folder for the db files. Now, for your slave domains, if you prefer them to go to /etc/namedb/slave/domain.tld.db, modify the appropriate section for that zone:
Code:
zone "domain.tld" {
        type slave;
        file "/etc/namedb/slave/domain.tld.db";
};