Random 502 errors when proxying to application with self-signed certificate

Wow, what a silly mistake :see_no_evil: Thank you for looking into it and giving a detailed explaination, too!

I will follow your advice and clean up my config.
The superflous bind statement was generated by the Nix expression used to enable Caddy on NixOS. I will poke around a little why it is there but it’s good to know that it basically is a NOOP

You are essentially load balancing between https://127.0.0.1:8443 and https://:80

This bit caught my interest. How does the additional colon translate to upstream https://:80 ?