Cloudflare TLS SSL certificate format

1. Caddy version (caddy version):

2.4.6

2. How I run Caddy:

i use caddy as a reverse proxy, the DNS is connected to Cloudflare nameservers

a. System environment:

windows 10

b. Command:

.\caddy run

d. My complete Caddyfile or JSON config:

domian {
	reverse_proxy localhost:8096
	tls E:\Server\Certs\certificate.pem E:\Server\Certs\key.pem
} 

3. The problem I’m having:

Im trying to import cloud flares SSL certificates to caddy however i believe im using the wrong format. im using the format ive found for linux guides however i dont believe this works on windows 10 and im wondering if anyone knows the correct format or what im doing wrong.

4. Error messages and/or full log output:

2022/04/17 08:42:24.211 ←[34mINFO←[0m using adjacent Caddyfile
2022/04/17 08:42:24.212 ←[33mWARN←[0m Caddyfile input is not formatted; run the ‘caddy fmt’ command to fix inconsistencies {“adapter”: “caddyfile”, “file”: “Caddyfile”, “line”: 4}
2022/04/17 08:42:24.221 ←[34mINFO←[0m admin admin endpoint started {“address”: “tcp/localhost:2019”, “enforce_origin”: false, “origins”: ["//localhost:2019", “//[::1]:2019”, “//127.0.0.1:2019”]}
2022/04/17 08:42:24.221 ←[34mINFO←[0m tls.cache.maintenance started background certificate maintenance {“cache”: “0xc00070b810”}
2022/04/17 08:42:24.225 ←[33mWARN←[0m tls stapling OCSP {“error”: “no OCSP stapling for [cloudflare origin certificate *.domain domain]: no URL to issuing certificate”}
2022/04/17 08:42:24.225 ←[34mINFO←[0m http skipping automatic certificate management because one or more matching certificates are already loaded {“domain”: " domain", “server_name”: “srv0”}
2022/04/17 08:42:24.225 ←[34mINFO←[0m http enabling automatic HTTP->HTTPS redirects {“server_name”: “srv0”}
2022/04/17 08:42:24.225 ←[34mINFO←[0m tls cleaning storage unit {“description”: “FileStorage:C:\Users\account\AppData\Roaming\Caddy”}
2022/04/17 08:42:24.228 ←[34mINFO←[0m autosaved config (load with --resume flag) {“file”: “C:\Users\account\AppData\Roaming\Caddy\autosave.json”}
2022/04/17 08:42:24.228 ←[34mINFO←[0m serving initial configuration
Successfully started Caddy (pid=18160) - Caddy is running in the background
2022/04/17 08:42:24.232 ←[34mINFO←[0m tls finished cleaning storage units

5. What I already tried:

searched doc and google but all are for linux.

Hope this is enough information and thank you for any future responses

It’s the same format regardless of platform. What makes you think you have that wrong? I don’t see any evidence of problems loading your cert/key in your logs.

What’s the problem, exactly? What specifically isn’t working?

1 Like

i assumed it was ignoring the TLS line due to

“[33mWARN←[0m Caddyfile input is not formatted; run the ‘caddy fmt’ command to fix inconsistencies {“adapter”: “caddyfile”, “file”: “Caddyfile”, “line”: 4}”

and

“[33mWARN←[0m tls stapling OCSP {“error”: “no OCSP stapling for [cloudflare origin certificate *.domain domain]: no URL to issuing certificate”}”

are these not errors?

No, those are warnings (notice the “WARN” at the beginning)

1 Like

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