diff --git a/src/docs/markdown/caddyfile/options.md b/src/docs/markdown/caddyfile/options.md index 5b505a9..bd28d35 100644 --- a/src/docs/markdown/caddyfile/options.md +++ b/src/docs/markdown/caddyfile/options.md @@ -369,6 +369,37 @@ 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. @@ -376,11 +407,7 @@ A custom name to assign to this server. Usually helpful to identify a server by - -For example: +To overcome this, you'll need to create an empty `:80` or `http://` site block and set this option. With that Auto-HTTPS will add its redirect routes to that server. For example: ```caddy { @@ -400,35 +427,9 @@ http:// { } ``` - - -For example: -```caddy -{ - # This will NOT match any listener - servers :8080 { - name private - } - - # This will work because it's an exact match - servers 192.168.1.2:8080 { - name public - } -} -:8080 { - bind 127.0.0.1 -} - -:8080 { - bind 192.168.1.2 -} -``` ##### `listener_wrappers`