From 3c8bd2a98b7bee28711f4f2565fdecf6563cea6e Mon Sep 17 00:00:00 2001 From: Aaron Paterson <9441877+MayCXC@users.noreply.github.com> Date: Thu, 10 Oct 2024 00:21:43 -0400 Subject: [PATCH] Update options.md --- src/docs/markdown/caddyfile/options.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/docs/markdown/caddyfile/options.md b/src/docs/markdown/caddyfile/options.md index f57fb37..ca2afe7 100644 --- a/src/docs/markdown/caddyfile/options.md +++ b/src/docs/markdown/caddyfile/options.md @@ -56,7 +56,9 @@ Possible options are (click on each option to jump to its documentation): debug http_port https_port - default_bind + default_bind { + protocols ... + } order first|last|[before|after ] storage { @@ -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. +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.