Hoping the brain trust can help.

Single reverse proxy? No issues at all. If I add multiple per some instructions on the caddy forums, nothing works - the docker container just continually reboots with no errors in the log.

Caddyfile:

fmd.domain.ca {
    reverse_proxy 10.179.200.199:8080
}

llama.domain.ca {
    reverse_proxy 192.168.3.199:3000
)

With only the fmd entry, works fine.

  • Azura The Spellkissed@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    3 hours ago

    Note that you are likely leaking a list of all your subdomains in certificate transparency logs. Some users might not want that to happen, in that case using a wildcard certificate can help, but it’s either more tedious to set up (generating the cert outside of caddy) or less readable (using a Caddyfile with a single domain block for the wildcard containing a handle block per subdomains).

    • CorrectAlias@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 hours ago

      I user caddy-cloudflare with *.caddy files which allows me to get a signed wildcard cert for my internal subdomains. I did it for this exact reason, I didn’t want to leak my internal subdomains.

    • crandall@lemmy.today
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 hours ago

      Its actually simpler than I expected to do the wildcard cert setup in Caddy. Its not necessary to nest everything. You can just add the wildcard block at the top, and leave the rest of the config as-is, and they will default to using the wildcard instead of individual certs.

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 hours ago

      It’s a good idea to validate your config before reloading it (whether it’s by running caddy reload or restarting/reprovisioning the container):

      [docker exec -it caddy-container] caddy validate --config /etc/caddy/Caddyfile
      
      • UnrefinedChihuahua@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 hours ago

        This is a home lab, I have no change control or testing. It either comes up or it doesn’t. We test in prod around here.

        One day it’s gonna bite me in the ass hard.