lucaslorentz / caddy-docker-proxy

Caddy as a reverse proxy for Docker
MIT License
2.61k stars 163 forks source link

wildcard not working #619

Open mihsergeev opened 1 month ago

mihsergeev commented 1 month ago

labels: caddy: *.domain.con caddy.reverse_proxy: "{{upstreams http 80}}"

how to do it correctly so that it accepts requests from all domains, no need to make ssl-certs

francislavoie commented 1 month ago

You always needs a TLS cert to serve HTTPS. A wildcard only means you're asking Caddy to issue a special certificate with a wildcard in it, which requires building Caddy with a DNS plugin to connect with your DNS provider, because the ACME DNS challenge requires proving that you are in control of your domain's DNS records. https://caddyserver.com/docs/automatic-https#dns-challenge

mihsergeev commented 1 month ago
labels:
  caddy: *.domain.com domain.com
  caddy.reverse_proxy: "{{upstreams 80}}"
  caddy.tls.dns: "cloudflare $API-TOKEN" 

doesn't work, how to write correctly?