How to route port80/443 traffic to right webserver with single public ip

Discussion in 'General' started by Frost, Apr 25, 2020.

  1. Frost

    Frost Member

    I have web1 with web2 mirror server. It contains multiple websites on it. Now, I'm trying to add another web3 with web4 as its mirror.
    Initially, I have haproxy that routes port 80/443 traffic to web1/web2 whichever is available. I want to ask how to approach this when I have web3/web4 now. I saw some thread having apache mod_proxy but this will require me to manually define each domain's webserver right? I am hoping to make it automatic or dynamic. I also want to confirm if having another public IP address will solve this issue.

    Environment:
    The latest version of ISPConfig with a dedicated server(& mirror) for each service. (web1/2,mail1/2,db1/2,ns1/2)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    proxying would be the way to go and the only way to automate this would probably to write a plugin for ispconfig that adds a proxy configuration automatically when you add a website to one of the other servers.

    Yes, normally each server has its own public IP and in such a setup, you don't need a proxy.
     
  3. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    You could add a second public ip to your haproxy box, and forward requests for ip1 to web1/2, and requests to ip2 to web3/4, that's probably the simplest solution if you have the ip available.
     

Share This Page