Host header redirection solution



  • Hi, i've seen that there was a two-three questions about that in past years and want to ask is there a working solution ? I've just upgraded to 2.0.1 and i have a couple of web servers behind one public IP (WAN interface). Is there a solution so the requests being redirected based on the url www.siteA.com to 192.168.1.10:80 and www.siteB.com to 192.168.1.11:80 ? I have checked a couple of posts here and over the net but i couldn't find any working example how to do that. Can someone tell me if it's possible to do that using pfsense and if it is possible to point me how to do it. I'll make a tutorial once i've done it i promise :)



  • I am not sure how to do it, but there is haproxy, squid3 <reverse>, and varnish that can do that.</reverse>



  • I've found info that it can be done by those packages haproxy, squid and varnish but i couldn't manage to do it. There is info about Load Balancing but not about my specific problem.



  • Also i forgot - i try all of them and neither one wanted to start  ???  Varnish, HAProxy and Proxy Server with mod_security also when i check in Status -> Services  they aren't started and if i try to start them manually they doesn't start  ???



  • Probably a miss-configuration, try checking you log files for any issues.



  • I couldn't find anything related to any of them in logs. maybe i'm not looking where i should be…



  • I have not used varnish or ha proxy, but I have used squid. With squid, logging is off by default and you need to turn it on. Even when it is on, it has its own log you can only check from the service tab and not the system logs. I don't know if that is the case with the others or not. I am just trying to help give you a start.



  • Hi podilarius I appreciate your help ! I have figured this out and everything is working exactly how i want it now. The problem with me was that i have upgraded my 1.2.3 pfsense box to 2.0.1 and somewhere obviously goes wrong with that. I've got a couple of services (that i have been used in the past with 1.2.3) that were not installed and not running but they prevented everything from working fine. I had them removed manually and then install squid3 and set it up and now everything is OK. If someone need info about squid settings i will post it here.
    My setup is:

    WAN IP (one public WAN IP address, and LAN IP 192.168.1.1)
    |
    |
    |–-- 192.168.1.2 IIS with multiple sites on it
    |
    |---- 192.168.1.3 Apache2 with multiple sites on it (this is new so that is why i need reverse proxy)
    |
    |---- other lan computers 192.168.1.0/24



  • Great to here.


Locked