Ok I think I have found the problem which is the on_demand
call in my config. If I remove this, it seems to work.
If someone with a bit more experience and knowledge could confirm that I’m doing the right thing, I’d really appreciate it!
*.mydomain.com:443 {
reverse_proxy 127.0.0.1:4567 {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Real-IP {http.reverse-proxy.upstream.address}
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Host {http.request.host}
}
tls me@mydomain.com {
dns cloudflare <api-token>
}
log {
output file /var/log/caddy/access.log
}
}