Local certificates but only for one out of the domain names only

1. The problem I’m having:

I am trying to use the following rule in the caddyfile:

fqdn.com.au, caddy {
  # lots of rules here 
}

While caddy successfully issues ssl cert for fqdn.com.au, it fails to do so for caddy.

How do I configure it so it issues local certificate but for caddy only; fqdn.com.au must use Let’s Encrypt.

2. Error messages and/or full log output:

app-caddyprod-1  | {"level":"error","ts":1677515198.8789244,"logger":"tls.obtain","msg":"will retry","error":"[caddy] Obtain: [caddy] creating new order: attempt 1: https://acme.zerossl.com/v2/DV90/newOrder: HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Invalid DNS identifier [caddy] (ca=https://acme.zerossl.com/v2/DV90)","attempt":1,"retrying_in":60,"elapsed":12.983742686,"max_duration":2592000}

3. Caddy version:

2.6.4

4. How I installed and ran Caddy:

In a docker container

a. System environment:

Ubuntu 22.04 LTS, AMD

Use tls internal. You’ll need to split your site in two:

fqdn.com.au {
	# your config here
}

caddy {
	tls internal
	# your config here
}

You can make use of snippets to copy shared bits of config.

1 Like

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