问题原文
原帖链接 · alexandernst · CC BY-SA 3.0
I'd like to have all my zone files in a few directories (let's just stick with the idea that I can't know how many directories will be there nor what name will they have) and make BIND include them all. (not recursive, just zone files in first folder)
In other words, is something like this possible?
options {
directory "/var/bindconf/*";
}
With a folder structure like:
/var/bindconf/folderA/my_zone_file.conf
/var/bindconf/folderB/my_zone_file_1.conf
/var/bindconf/folderB/my_zone_file_2.conf
/var/bindconf/folderC/my_zone_file_1.conf
/var/bindconf/folderC/my_zone_file_2.conf
/var/bindconf/folderC/my_zone_file_3.conf
Regards
已采纳解答
原帖链接 · NickW · CC BY-SA 4.0
According to the Bind documentation, no:
include Statement Grammar
include filename;
include Statement Definition and Usage
The include statement inserts the specified file at the point where the include statement is encountered. The include statement facilitates the administration of configuration files by permitting the reading or writing of some things but not others. For example, the statement could include private keys that are readable only by the name server.
The same thing applies in the options directive:
directory
The working directory of the server. Any non-absolute pathnames in the configuration file will be taken as relative to this directory. The default location for most server output files (e.g. named.run) is this directory. If a directory is not specified, the working directory defaults to `.', the directory from which the server was started. The directory specified should be an absolute path.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
