Hi, I try to achieve the following in a maintainable style, with a list of 20 domains that point to the same backend:
Redirect HTTP to HTTPS
Redirect unknown domains to www.domaina.com
Redirect domaina.com -> www.domaina.com
Redirect domainb.com -> www.domainb.com etc
Make a map of some kind with domaina.com: UUID1, domainb.com: UUID2 etc
Handle traffic for https://www.domaina.com to reverse_proxy backend with header X-Forwarded-Site-Id UUID1;
Handle traffic for https://www.domaing.com to reverse_proxy backend with header X-Forwarded-Site-Id UUID2; etc
TLS certs will probably be self signed, there is CF before the server, so it can't use certbot I think?
I'm struggling a bit to make this as maintainable as possible and simple to add new domains. Does anyone have a hint for me?
Edited 1 time(s). Last edit at 04/10/2023 09:21AM by JJWTimmer.