Caddy with custom domain throws tls error

I have the following caddy file (I have Caddy2 installed and using Caddyfile) -

localhost {
	respond "Hello World !"
} {
	respond "Hello auth app"

When I do a sudo caddy reload I get the following error -

2021/01/23 08:05:07.347 ERROR tls job failed {“error”: obtaining certificate: context canceled”}

this is the error I see in the log -

2021/01/23 08:08:22.981 ERROR tls.issuance.acme.acme_client challenge
failed {“identifier”: “”, “challenge_type”:
“tls-alpn-01”, “status_code”: 400, “problem_type”:
“urn:ietf:params:acme:error:tls”, “error”: “remote error: tls: no
application protocol”} 2021/01/23
08:08:22.981 ERROR tls.issuance.acme.acme_client validating
authorization {“identifier”: “”, “error”:
“authorization failed: HTTP 400 urn:ietf:params:acme:error:tls -
remote error: tls: no application protocol”, “order”:”,
“attempt”: 1, “max_attempts”: 3}

Adding tls internal works but the log errors are still thrown. ie I can now access the url using curl, however the error on caddy reload and in the log are still being thrown.

Take a look at these docs -

When you switch to internal, you are using the internal CA and not an external provider like LetsEncrypt.

Looks like the CA is not reaching Caddy when making a TLS connection to it. Make sure your DNS is properly configured, and your network/firewall too.

This topic was automatically closed after 30 days. New replies are no longer allowed.