diff --git a/src/docs/markdown/caddyfile/options.md b/src/docs/markdown/caddyfile/options.md index e22f817..e780c28 100644 --- a/src/docs/markdown/caddyfile/options.md +++ b/src/docs/markdown/caddyfile/options.md @@ -96,6 +96,7 @@ Possible options are: # Server Options servers [] { + name listener_wrappers { } @@ -360,6 +361,38 @@ For example, to configure different options for the servers on ports `:80` and ` } ``` +##### `name` + +A custom name to assign to this server. Usually helpful to identify a server by its name in logs and metrics. If not set, Caddy will define it dynamically using a `srvX` pattern, where `X` starts with 0 and increments based on the number of servers in the config. + + + +For example: + +```caddy +{ + servers :443 { + name https + } + + servers :80 { + name http + } +} + +example.com { +} + +http:// { +} +``` + + ##### `listener_wrappers` Allows configuring [listener wrappers](/docs/json/apps/http/servers/listener_wrappers/), which can modify the behaviour of the socket listener. They are applied in the given order.