Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run: adapting config using caddyfile: hostname appears in more than one automation policy, making certificate management ambiguous: office.bosheng.li #4198

Closed
vibbow opened this issue Jun 9, 2021 · 2 comments
Labels
bug 🐞 Something isn't working duplicate 🖇️ This issue or pull request already exists
Milestone

Comments

@vibbow
Copy link

vibbow commented Jun 9, 2021

I got following configuration works in older version of caddy, but after I upgrade to latest caddy, this config no longer works, with error:

run: adapting config using caddyfile: hostname appears in more than one automation policy, making certificate management ambiguous: office.bosheng.li

Caddy version: v2.4.1 h1:kAJ0JB5Xk5gPdTH/27S5cyoMGqD5lBAe9yZ8zTjVJa0=

http://office.bosheng.li:5000 {
  reverse_proxy http://home-nas-01.lan:5000
}


https://office.bosheng.li:5001 {
   tls internal

   reverse_proxy https://home-nas-01.lan:5001 {
   transport http {
      tls_insecure_skip_verify
    }
  }
}
@mholt
Copy link
Member

mholt commented Jun 9, 2021

Looks like a duplicate of #4176. We fixed a bug that allowed ambiguous TLS automation policies to be adapted and used, which was incorrect.

Your config is asking Caddy to manage a cert for the same name in two different ways (with internal CA, and default which uses public CAs), so it's ambiguous and in conflict. Either give all the sites with that hostname the same TLS certificate management configuration, or move it into the global options (local_certs).

@mholt mholt added the duplicate 🖇️ This issue or pull request already exists label Jun 9, 2021
@mholt mholt closed this as completed Jun 9, 2021
@mholt
Copy link
Member

mholt commented Jun 9, 2021

Actually, your first site block specifies http only. This is what I get for reading issues after midnight on my phone. Maybe I'll try to repro this in the morning...

@mholt mholt reopened this Jun 9, 2021
@mholt mholt added bug 🐞 Something isn't working and removed duplicate 🖇️ This issue or pull request already exists labels Jun 9, 2021
@mholt mholt added this to the v2.4.2 milestone Jun 9, 2021
@mholt mholt closed this as completed in 05656a6 Jun 9, 2021
@mholt mholt added the duplicate 🖇️ This issue or pull request already exists label Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working duplicate 🖇️ This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants