Thanks for making this post because I was searching for the answers and beyond. I did find this post too: Running a Caddy server behind another [SOLVED]
I would like to know on which instance (front or back) I should put all the directives in? Does it matter at all?
front instance facing public internet
subdomain.domain.tld {
reverse_proxy http://192.168.1.50
basic_auth {
<username> <hash>
}
}
back instance 192.168.1.50 facing private subnet
http://subdomain.domain.tld {
reverse_proxy <docker-container>:<port>
}