Routing to 2 web servers, 1 wan
-
Hi everyone,
I have an unusual request or at least I cant find any similar threads.
I have a simple Pfsense on a box, with 1 WAN and 1 LAN
I have 2 domains, ill call them domain1.com and domain2.com and a webserver for each domain on the LAN called websrv.domain1.com and websrv.domain2.com
Each domain has an A record for each server pointing to our WAN IP (the requests reach our WAN with no problem)
I would like to know if I can route HTTP (port80) traffic from each of those domains to the respective web servers on the LAN?
if anyone has any suggestions how to accomplish this I would be very appreciative.
TIA
Paul
-
Check out the HAProxy package.
-Rico
-
There is a method where the HTTP(S) header is examined for the requested host name. With this, you can have multiple servers at the same IP address and then sort out the connections accordingly. However, I haven't done this myself, so I'm no expert.
-
Yup you can do it using host headers either in HAProxy or Squid Reverse.
Steve
-
Oh and by the way, @jimp did a great hangout: https://www.netgate.com/resources/videos/server-load-balancing-on-pfsense-24.html :-)
-Rico