mirror of
https://github.com/coredns/coredns.git
synced 2025-12-04 09:25:13 -05:00
middleware/root: add it (#330)
This PR adds the *root* middleware that specifies a path where all zone file (the *file* middleware is the only consumer now) can be found. It works the same as in Caddy. Documentation can be found in the README.md of the middleware. Fixes #307
This commit is contained in:
21
middleware/root/README.md
Normal file
21
middleware/root/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# root
|
||||
|
||||
*root* simply specifies the root of where CoreDNS finds (e.g.) zone files.
|
||||
The default root is the current working directory of CoreDNS.
|
||||
A relative root path is relative to the current working directory.
|
||||
|
||||
## Syntax
|
||||
|
||||
~~~ txt
|
||||
root PATH
|
||||
~~~
|
||||
|
||||
**PATH** is the directory to set as CoreDNS' root.
|
||||
|
||||
## Examples
|
||||
|
||||
Serve zone data (when the *file* middleware is used) from `/etc/coredns/zones`:
|
||||
|
||||
~~~ txt
|
||||
root /etc/coredns/zones
|
||||
~~~
|
||||
Reference in New Issue
Block a user