I am trying to use the ‘catch all domains’ as my website allows users to use their custom domain, and they need automatic certificates, but it does catch all the domain as you can see on the config file, but it doesn’t create a SSL. If I specify a domain name on the config file instead of just https:// or :443, it works, but when you do it like the config the error raises:
I’ve seen on some threads on this community that this issue was fixed on the latest version of Caddy, but I tried on three different versions of Caddy, but it happens the same. I don’t know what I am missing as I am not accustomed to Go & Caddy. It doesn’t seem to be clear about this on any posts I’ve found on Google.
Thanks for the information. I’ve already checked this a while ago, and there seems to be no answers ! I wish he’d left a solution if he found one… I forgot to mention that I am trying to use main certificates that I have in the local server, as well as the ones automatically generated by Let’s encrypt for custom domains that my clients have.
I tried multiple settings to see, and eventually gave up setting a config using CaddyFile. Instead, I am working on the json format.
I noticed this is something to do with the custom certificates that I load into the config file. If I set tls_connection_policies in the config it doesn’t work, returning the client hello error, but omitting it makes it work.
Caddy seems to load the certificates even if I omit “tls_connection_policies”. Does Caddy automatically detect certificates, and load it onto the client?
What are the respective configs for these behaviors?
"tls_connection_policies" is independent of loading certificates. Connection policies only specify how to handle TLS connections with clients (including cipher suites, client auth, and certificates to present to the client, etc). Loading and managing certificates is separate, which is configured through "tls/certificates" and "tls/automation" keys of the JSON config, as your config above shows. These establish how Caddy loads certificates it can use and how it will automate them.