1. Caddy version:
v2.6.3 h1:QRVBNIqfpqZ1eJacY44I6eUC1OcxQ8D04EKImzpj7S8=
2. How I installed, and run Caddy:
Downloaded executable, run at command line
a. System environment:
Windows Server 2019
b. Command:
caddy run
c. Service/unit/compose file:
None
d. My complete Caddy config:
:2015 {
respond "Hello, world!"
}
3. The problem I’m having:
HTTP serves fine, HTTPS fails.
This was working before going down the Docker rabbit hole so I stripped the reverse proxy and static files so it’s the bare minimum. Caddyfile
for debugging.
4. Error messages and/or full log output:
caddy run:
2023/02/15 04:20:05.451 e[34mINFOe[0m using adjacent Caddyfile
2023/02/15 04:20:05.461 e[34mINFOe[0m admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2023/02/15 04:20:05.461 e[34mINFOe[0m tls.cache.maintenance started background certificate maintenance {"cache": "0xc000328690"}
2023/02/15 04:20:05.461 e[34mINFOe[0m http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2023/02/15 04:20:05.461 e[34mINFOe[0m tls cleaning storage unit {"description": "FileStorage:C:\\Users\\Administrator\\AppData\\Roaming\\Caddy"}
2023/02/15 04:20:05.461 e[34mINFOe[0m autosaved config (load with --resume flag) {"file": "C:\\Users\\Administrator\\AppData\\Roaming\\Caddy\\autosave.json"}
2023/02/15 04:20:05.461 e[34mINFOe[0m serving initial configuration
2023/02/15 04:20:05.461 e[34mINFOe[0m tls finished cleaning storage units
curl -v http://localhost:2015
* Trying 127.0.0.1:2015...
* Connected to localhost (127.0.0.1) port 2015 (#0)
> GET / HTTP/1.1
> Host: localhost:2015
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
< Server: Caddy
< Date: Wed, 15 Feb 2023 04:26:40 GMT
< Content-Length: 13
<
Hello, world!* Connection #0 to host localhost left intact
curl -v https://localhost:2015
* Trying 127.0.0.1:2015...
* Connected to localhost (127.0.0.1) port 2015 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid
* Closing connection 0
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid
caddy trust
2023/02/15 04:28:10.294 e[34mINFOe[0m root certificate is already trusted by system {"path": "localhost:2019/pki/ca/local"}
5. What I already tried:
Stripped Caddyfile
to bare minimum, tried caddy trust
again. The solution I worked out here in my first thread with Docker is still working. I did a clean boot and tested Caddy standalone, those responses are included above. After that failure I closed the Caddy started at command line and ran my Docker version and HTTPS came right up.