Update options.md

This commit is contained in:
Aaron Paterson 2024-10-10 00:21:43 -04:00 committed by GitHub
parent bc8db1de26
commit 3c8bd2a98b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,7 +56,9 @@ Possible options are (click on each option to jump to its documentation):
debug
http_port <port>
https_port <port>
default_bind <hosts...>
default_bind <hosts...> {
protocols <protocol> ...
}
order <dir1> first|last|[before|after <dir2>]
storage <module_name> {
<options...>
@ -192,7 +194,7 @@ Default: `443`
##### `default_bind`
The default bind address(es) to be used for all sites, if the [`bind` directive](/docs/caddyfile/directives/bind) is not used in the site. Default: empty, which binds to all interfaces.
The default bind address(es) and the HTTP protocol(s) to be serve with them for all sites, if the [`bind` directive](/docs/caddyfile/directives/bind) is not used in the site. Default: empty, which binds to all interfaces, and serves the default protocols (h1+h2+h3) on them.
<aside class="tip">
@ -200,13 +202,23 @@ Keep in mind that this will only apply to servers which are generated by the Cad
</aside>
For example, to bind to `10.0.0.1` when no other address(es) are specified:
```caddy
{
default_bind 10.0.0.1
}
```
or to disable HTTP/3 unless otherwise specified:
```caddy
{
default_bind {
protocols h1 h2
}
}
```
##### `order`
Assigns an order to HTTP handler directive(s). As HTTP handlers execute in a sequential chain, it is necessary for the handlers to be executed in the right order. Standard directives have [a pre-defined order](/docs/caddyfile/directives#directive-order), but if using third-party HTTP handler modules, you'll need to define the order explicitly by either using this option or placing the directive in a [`route` block](/docs/caddyfile/directives/route). Ordering can be described absolutely (`first` or `last`), or relatively (`before` or `after`) to another directive.