@adlib The map
directive is one of my favourite Caddy commands when dealing with a number of subdomains (or sub-paths). I love the ‘at a glance’ overview it provides me across all subdomains. However, it’s worth noting that coupling map
and the upstream services will close off other options that may be of interest at some point e.g. determining the status of upstream servers API — Caddy Documentation. You just need to be aware of this. If those options aren’t going to be of interest, what @francislavoie has suggested works perfectly. For a broader discussion of the issue, and discussion of a hybrid map approach that uses snippets to decouple `map and the upstream servers, refer to Load balancing queries
2 Likes