Which version, exactly? How did you build Caddy? Please use one of the supported installation methods Install — Caddy Documentation, or make your custom build with xcaddy.
Remove all these lines. Where did you get them from? These are not useful, and often harmful. Caddy sets the appropriate proxy headers automatically.
You’re running into this:
I recommend using subdomains for each service instead of subpaths. Much easier to configure reliably.