1. Output of caddy version
:
PS C:\Users\Admin\Documents> caddy version
v2.5.2 h1:eCJdLyEyAGzuQTa5Mh3gETnYWDClo1LjtQm2q9RNZrs=
2. How I run Caddy:
Manually invoked in PowerShell, haven’t setup task scheduler for caddy on this system yet.
a. System environment:
Windows 10, amd64, Version 21H2
b. Command:
caddy start
or when trying to debug;
caddy run
c. Service/unit/compose file:
N/A
d. My complete Caddy config:
# Caddyfile for frenchfry
#:80 {
# file_server
# root * C:\www
#}
96.230.16.132 {
file_server
root * C:\www
tls "C:\Users\Admin\Documents\96.230.16.132\mycert.pem" "C:\Users\Admin\Documents\96.230.16.132\key.pem"
}
3. The problem I’m having:
Afaik, Caddy is not sending the certificate I used at all. The cert is issued by ZeroSSL and is valid.
I have configured Caddy the same way on other systems before (using the same process to make the cert) and had no issues.
4. Error messages and/or full log output:
PS C:\Users\Admin\Documents> caddy run
2022/08/20 13:24:30.911 ←[34mINFO←[0m using adjacent Caddyfile
2022/08/20 13:24:30.920 ←[34mINFO←[0m admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2022/08/20 13:24:30.921 ←[34mINFO←[0m tls.cache.maintenance started background certificate maintenance {"cache": "0xc000233420"}
2022/08/20 13:24:30.921 ←[34mINFO←[0m http skipping automatic certificate management because one or more matching certificates are already loaded {"domain": "96.230.16.132", "server_name": "srv0"}
2022/08/20 13:24:30.921 ←[34mINFO←[0m http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2022/08/20 13:24:30.923 ←[34mINFO←[0m tls cleaning storage unit {"description": "FileStorage:C:\\Users\\Admin\\AppData\\Roaming\\Caddy"}
2022/08/20 13:24:30.924 ←[34mINFO←[0m tls finished cleaning storage units
2022/08/20 13:24:30.925 ←[34mINFO←[0m autosaved config (load with --resume flag) {"file": "C:\\Users\\Admin\\AppData\\Roaming\\Caddy\\autosave.json"}
2022/08/20 13:24:30.925 ←[34mINFO←[0m serving initial configuration
PS C:\Users\Tyler> curl -v https://96.230.16.132/
VERBOSE: GET https://96.230.16.132/ with 0-byte payload
curl : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ curl -v https://96.230.16.132/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
5. What I already tried:
I have tried rewriting my Caddyfile, commenting the tls directive and using tls internal instead, not really much else I can try as ACME does not support an IP address and this is a relatively simple caddyfile, a “known working” (setup the same way before on other host) config, and I could not really think of much else to try.
6. Links to relevant resources:
N/A