大网数据广告活动
服务器运维问答

BIND wildcard in directory

· 52CE 我爱测

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 …

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-03-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。