| 1 |
# Name |
| 2 |
|
| 3 |
_url_ - serve zone data from an URL |
| 4 |
|
| 5 |
# Description |
| 6 |
|
| 7 |
The _url_ handler is used for serving zone data that is fetched from an URL. The most prominent example of |
| 8 |
this is downloading the root zone from <https://www.internic.net/domain/root.zone>. |
| 9 |
|
| 10 |
The server will reply with minimal responses by default. The _url_ handler will watch the zone file and when |
| 11 |
it receives a (kernel) notify it will reload the zone after 2 seconds. |
| 12 |
|
| 13 |
# Syntax |
| 14 |
|
| 15 |
``` |
| 16 |
url FILE { |
| 17 |
URL |
| 18 |
} |
| 19 |
``` |
| 20 |
|
| 21 |
- **FILE** the zone file to save the data to and to serve from. If the path is relative, the path from the |
| 22 |
global root config will be prepended to it. |
| 23 |
- **URL** the URL to fetch the zone from, a scheme must be used. This may be used multiple times, in which |
| 24 |
subsequent URLs are used as backup and downloaded when the earlier URL doesn't work. |
| 25 |
|
| 26 |
If the handler block specification contains multiple zones, they all will use the _same_ **FILE**. And you must make |
| 27 |
sure that zone **FILE** is generic enough, i.e. use `@` for zones instead of domain names. |
| 28 |
|
| 29 |
# Examples |
| 30 |
|
| 31 |
Load the root zone from and save it in `root.transferred`. |
| 32 |
|
| 33 |
```conffile |
| 34 |
. { |
| 35 |
url root.transferred { |
| 36 |
https://www.internic.net/domain/root.zone |
| 37 |
} |
| 38 |
} |
| 39 |
``` |