Hi @renothing,
This looks like a bug of some kind. I was able to replicate it on Caddy 0.11.1 on macOS.
When I was testing, I had the front end Caddy (e.g. Caddy1) output access and error logs and recorded [ERROR 502 /] remote error: tls: internal error
whenever I attempted to connect.
The back end Caddy (Caddy2) was also outputting access/error logs, but didn’t record anything until I attempted to connect directly (which worked fine).
The HTTPS certificates were valid in my testing (I also used DNS validation), and the error doesn’t occur when using HTTP instead of HTTPS.
For whatever reason, Caddy just doesn’t like proxying to Caddy over HTTPS…
Would you mind reporting this as an issue on the Caddy git repo? https://github.com/mholt/caddy/issues/new