How to setup multiple domains names for multiples reverse proxy on the same Network reddit / selfhosted ---------------------------------------------------------------------- ForTwisted · 2023-11-29 20:19 Hi, I'm currently running a proxmox with: \- OPNSense \- debian1 \- debian2 I have 2 domains names ([domain1.com](https://domain1.com) and [domain2.com](https://domain2.com)) and one reverse proxy on each debian. I want: \*.domain1.com -> [domain1.com](https://domain1.com) \*.domain2.com -> [domain2.com](https://domain2.com) Does it possible ? I oppened ports 80 and 443 for both debian but only one is working. I also tried to setup a third reverse proxy but I don't know how to configure it. Can you help me ? ---------------------------------------------------------------------- thekrautboy · 2023-11-29 23:20 You need one reverse proxy that listens on your WAN interface, from there you can redirect to reverse proxy B and C on the two debians. Plenty of guides exist. ---------------------------------------------------------------------- ForTwisted · 2023-11-30 08:59 Strangely, I can't seem to find this kind of guide... What are the right search terms? forward proxy, reverse to reverse proxy? Also, if the third reverse proxy acts as a gateway for the other two, on which one should I configure the letencrypt ssl? ---------------------------------------------------------------------- hiddengiggles · 2023-11-30 10:41 The one that has access to the internet should be the one configured to performs the ssl certificate challenges. However having ssl between your reverse proxies is smart. I would share that certificate with the other 2 servers so they can perform ssl too. ---------------------------------------------------------------------- utahbmxer · 2023-11-30 21:16 Configure NGINX or HAProxy on your OPNsense and let it do the forwarding. (My preference is NGINX because it has a WAF for added security) Both are capable of doing SNI based routing (even path based if you want to go that specific). No reason to run another proxy on the debian machines, just setup the correct vhost on each if they are hosting more than a single domain, and make sure that OPNsense is forwarding the domain in the request. Without running one of those services on OPNsense, there really isn't an easy way to get two domains sharing the same IP to go to separate machines in your network, unless you want to run a 3rd debian machine and use that as a reverse proxy.