However, is there any way to make it simpler, such as combining the two (same domain but different ports)? I want Caddy to get SSL certificates for the domains. Are there other options I should consider for a basic proxy that simply redirects to another host like this?
You don’t need any of the header_up stuff though. Caddy already sets the For and Proto headers on its own automatically, and the other 3 are very rarely necessary.
Those header_up options are very commonly copy pasted from config to config by users who aren’t sure what those do without understanding why they need them.
Is my understanding correct that if I just set domains like above, then Caddy takes care of http and https (including certificate) by itself so I never have to specify ports basically?