mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Fix ACME HTTP-01 passthrough in HAProxy config
Add an ACL that routes /.well-known/acme-challenge/ requests on :80 to Caddy instead of redirecting to HTTPS, so Let's Encrypt certificate issuance works out of the box. Also simplify Caddyfile to use Caddy's http_port/https_port directives.
This commit is contained in:
@@ -45,16 +45,9 @@ docker compose exec mtg mtg access /config/config.toml
|
||||
|
||||
## ACME (Let's Encrypt) notes
|
||||
|
||||
Caddy needs to answer the ACME HTTP-01 challenge on port 80. The
|
||||
default `haproxy.cfg` redirects all `:80` traffic to HTTPS. If Caddy
|
||||
cannot obtain a certificate, either:
|
||||
|
||||
1. Temporarily stop HAProxy, let Caddy bind `:80` directly for the
|
||||
initial certificate, then start the full stack; or
|
||||
2. Use DNS-01 validation in the Caddyfile (requires a DNS provider
|
||||
plugin); or
|
||||
3. Add an HAProxy ACL that passes `/.well-known/acme-challenge/`
|
||||
requests to the Caddy backend instead of redirecting.
|
||||
HAProxy passes `/.well-known/acme-challenge/` requests on `:80` to
|
||||
Caddy so that HTTP-01 validation works out of the box. Make sure your
|
||||
domain's DNS A/AAAA record points to this server before starting.
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
Reference in New Issue
Block a user