caddy-docker-proxy icon indicating copy to clipboard operation
caddy-docker-proxy copied to clipboard

wildcard not working

Open mihsergeev opened this issue 1 year ago • 3 comments

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

mihsergeev avatar May 19 '24 18:05 mihsergeev

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

francislavoie avatar May 19 '24 20:05 francislavoie

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

doesn't work, how to write correctly?

mihsergeev avatar May 28 '24 20:05 mihsergeev

which requires building Caddy with a DNS plugin

Is that possible with caddy-docker-proxy? Based on https://github.com/lucaslorentz/caddy-docker-proxy/blob/71e0ff7378a60903153b8549b201e76c4adb4f4f/Dockerfile-alpine#L11 it seems the build does not happen in a docker stage?

Edit: this should do 🙌 https://github.com/lucaslorentz/caddy-docker-proxy?tab=readme-ov-file#custom-images

thgh avatar Jun 21 '25 13:06 thgh