Updates based on feedback

This commit is contained in:
Daniel Santos 2023-01-27 14:44:58 -07:00 committed by GitHub
parent 33de7c090d
commit f2dacf64a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,7 @@ Possible options are:
# Server Options # Server Options
servers [<listener_address>] { servers [<listener_address>] {
name <name>
listener_wrappers { listener_wrappers {
<listener_wrappers...> <listener_wrappers...>
} }
@ -105,7 +106,6 @@ Possible options are:
write <duration> write <duration>
idle <duration> idle <duration>
} }
name <name>
metrics metrics
max_header_size <size> max_header_size <size>
log_credentials log_credentials
@ -368,7 +368,7 @@ A custom name to assign to this server. Usually helpful to identify a server by
<aside class="tip"> <aside class="tip">
Keep in mind there's a caveat if you want to name your HTTP server and are using Auto-HTTPS. The server name config doesn't persist past adapting the config, and Auto-HTTPS happens at runtime, from the JSON config. Keep in mind there's a caveat if you want to name your HTTP server and are using Auto-HTTPS. The server name config doesn't persist past adapting the config, and Auto-HTTPS happens at runtime, from the JSON config.
To overcome this, you'll need to create an empty `:80` or `http://` site block and rename it with `servers :80 { name http }` in the global options. With that Auto-HTTPS will add its redirect routes to that server. 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.
</aside> </aside>
@ -376,12 +376,20 @@ For example:
```caddy ```caddy
{ {
servers :443 {
name https
}
servers :80 { servers :80 {
name http-auto-redirect name http
} }
} }
:80 example.com {
}
http:// {
}
``` ```