docs: update caddy config example & guide (#13964)

This commit is contained in:
Nano
2024-07-22 03:47:41 -04:00
committed by GitHub
parent 88d2dbd994
commit 40b70dbdb0
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,9 @@
{
on_demand_tls {
ask http://example.com
}
}
coder.example.com, *.coder.example.com {
reverse_proxy localhost:3000
tls {

View File

@ -50,6 +50,7 @@ This is an example configuration of how to use Coder with [caddy](https://caddys
- `coder.example.com`: Domain name you're using for Coder.
- `*.coder.example.com`: Domain name for wildcard apps, commonly used for [dashboard port forwarding](https://coder.com/docs/coder-oss/latest/networking/port-forwarding#dashboard). This is optional and can be removed.
- `localhost:3000`: Address Coder is running on. Modify this if you changed `CODER_HTTP_ADDRESS` in the Coder configuration.
- _DO NOT CHANGE the `ask http://example.com` line! Doing so will result in your certs potentially not being generated._
4. [Configure Coder](https://coder.com/docs/coder-oss/latest/admin/configure) and change the following values:
@ -111,9 +112,9 @@ For production deployments, we recommend configuring Caddy to generate a wildcar
```diff
tls {
- on_demand
issuer acme {
email email@example.com
}
- issuer acme {
- email email@example.com
- }
+ dns route53 {
+ max_retries 10
@ -137,9 +138,9 @@ For production deployments, we recommend configuring Caddy to generate a wildcar
```diff
tls {
- on_demand
issuer acme {
email email@example.com
}
- issuer acme {
- email email@example.com
- }
+ dns cloudflare CLOUDFLARE_API_TOKEN
}