So I am migrating a bunch of proxied servers to Caddy v2 but ran out of luck. The luck ends when I try to use TLS between the machines, and I need it in this network.
1. Caddy version (caddy version
):
2.0.0
2. How I run Caddy:
Two Docker containers (official image) on the same machine
The LAN name for the server is dmz-02 and is served on 192.168.10.105
The two Docker containers are NOT connected to the same Docker network, they can only communicate via the host IP and exposed ports.
One container is a reverse proxy.
The other one is a container serving a dev test server (IP 172.25.0.8).
a. System environment:
Docker in Linux
b. My complete Caddyfile or JSON config:
Working Proxy Config:
dmz-02, dmz-02.lan {
tls internal
reverse_proxy {
to http://192.168.2.3:2080
}
}
Working Node Config:
http://dmz-02 {
respond "Local Test"
}
NOT WORKING Reverse Proxy Config
dmz-02, dmz-02.lan {
tls internal
reverse_proxy {
to https://192.168.2.3:2443
transport http {
tls
tls_insecure_skip_verify
}
}
}
NOT WORKING Working Node Config:
dmz-02 {
tls internal
respond "Local Test"
}
3. The problem Iām having:
When the two working config files above is in use, the proxying works. When I enable TLS (the two non working configs), it seems that the test container tries to serve a web page under the local IP instead of serving the domain name that is sent from the proxy?
Instead of getting āLocal Testā as a response, I get 502 Bad Gateway
4. Error messages and/or full log output:
So this is what happens when the NON WORKING config is in use.
http: TLS handshake error from 172.25.0.1:34030: no certificate available for ā172.25.0.8ā
5. What I already tried:
Everything I found the last seven hoursā¦
6. Links to relevant resources:
I thought my issue was related to this question, but the example is not served by Caddy and when I do it Caddy only it seems to break.
Please help, pretty please.