Welcome! Log In Create A New Profile

Advanced

Avoiding repetition

Posted by JJWTimmer 
Avoiding repetition
April 10, 2023 09:14AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready