1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
a. System environment:
Windows 10.0.19042 Build 19042
b. Command:
.\caddy_windows_amd64.exe run --config Caddyfile
c. Service/unit/compose file:
d. My complete Caddyfile or JSON config:
localhost:8443 {
reverse_proxy localhost:8096
}
3. The problem I’m having:
I’m trying to make http://localhost:8443 redirect to https://localhost:8443, which is setup as a reverse proxy.
4. Error messages and/or full log output:
Client sent an HTTP request to an HTTPS server.
5. What I already tried:
I tried to set a redir before the reverse proxy setting, like this:
http://localhost:8443 {
redir https://localhost:8443
}
https://localhost:8443 {
reverse_proxy localhost:8096
}
But then I get this message when trying to run caddy:
2021/01/07 15:38:51.176 INFO using provided configuration {“config_file”: “Caddyfile”, “config_adapter”: “”}
run: adapting config using caddyfile: server listening on [:8443] is configured for HTTP and cannot natively multiplex HTTP and HTTPS: https://localhost:8443