1. Caddy version (caddy version
):
v2.4.6
2. How I run Caddy:
a. System environment:
Windows Server 2019
b. Command:
caddy.exe run
c. Service/unit/compose file:
N/a
d. My complete Caddyfile or JSON config:
{
auto_https off
}
login.printershop.com:8000 {
reverse_proxy 192.168.0.12:8000
tls C:\Tools\LetsEncrypt.pem C:\Tools\LetsEncrypt.pem
}
3. The problem I’m having:
I am attempting to secure a legacy application that doesn’t support HTTPS via caddy.
Server 1: Caddy - Listen on HTTPS port 8000
Server 2: Legacy Application - Listening on HTTP port 8000
I already manage the certificate using Certify The Web as the server is also has IIS installed and cannot bind to port 80. Certificate will be auto renewed, exported and the certify application restarted from within the Certify The Web applications.
4. Error messages and/or full log output:
Receiving ERR_SSL_PROTOCOL_ERROR in the browser when accessing the IP:8000
c:\Tools>Caddy.exe run
2022/02/18 15:04:41.778 e[34mINFOe[0m using adjacent Caddyfile
2022/02/18 15:04:41.780 e[33mWARNe[0m input is not formatted with ‘caddy fmt’ {“adapter”: “caddyfile”, “file”: “Caddyfile”, “line”: 2}
2022/02/18 15:04:41.781 e[34mINFOe[0m admin admin endpoint started {“address”: “tcp/localhost:2019”, “enforce_origin”: false, “origins”: [“localhost:2019”, “[::1]:2019”, “127.0.0.1:2019”]}
2022/02/18 15:04:41.782 e[34mINFOe[0m tls.cache.maintenance started background certificate maintenance {“cache”: “0xc0003998f0”}
2022/02/18 15:04:41.785 e[34mINFOe[0m tls cleaning storage unit {“description”: “FileStorage:C:\Users\Governor\AppData\Roaming\Caddy”}
2022/02/18 15:04:41.786 e[34mINFOe[0m autosaved config (load with --resume flag) {“file”: “C:\Users\Governor\AppData\Roaming\Caddy\autosave.json”}
2022/02/18 15:04:41.788 e[34mINFOe[0m serving initial configuration
2022/02/18 15:04:41.788 e[34mINFOe[0m tls finished cleaning storage units
5. What I already tried:
Many configuration changes!