Dividing a Large named.conf File into Multiple Files

3.6.1 Problem

You want to divide a name server's named.conf file into multiple files.

3.6.2 Solution

Use the include statement. For example, to include the file primary.conf, which contains all of a name server's primary master zone statements, and the file slave.conf, which contains the name server's slave zone statements, you could add these include statements to named.conf:

include "primary.conf";
include "slave.conf";

3.6.3 Discussion

By default, the name server looks for the files you include in its working directory. To include files in other directories, specify the full path to the file. For example:

include "/etc/primary.conf";
include "/etc/slave.conf";

The include statement is usually used as a top-level statement; however, BIND 9.2.0 and later name servers allow include within most other statements.

3.6.4 See Also

If a name server is authoritative for so many zones that you need to break up the named.conf file, you may also need to use several directories for the zone data files, as described in Section 3.7. Also see "Using Several Directories" in Chapter 7 of DNS and BIND.

DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net