Use virtual ip address in mirror setup

Discussion in 'Installation/Configuration' started by nvl-it-solutions, Jun 18, 2018.

  1. nvl-it-solutions

    nvl-it-solutions New Member

    I recently added two ubuntu servers in a mirror configuration to my ISPConfig setup and configured them accordingly to the ISPConfig manual.
    The ip address the website is listening on is my virtual ip address which has been detected during ISPConfig setup.
    Keepalived is being used to switch the virtual ip address between the servers in case the primary server fails.
    Everything seems to be working fine, except when I do a failover, nginx cannot start because it lacks a part of the configuration.
    Further investigation showed that in the nginx vhost configuration no ip address has been setup to bind nginx to.
    It looks like the below snippet:

    Primary server (slave ispconfig):
    virtual ip address:80
    virtual ip addres:443

    Secondary server (slave ispconfig):
    :80
    :443

    Now I found an option in ISPConfig to setup server ipv4 mapping.
    I believe you can use it to solve the above issue.
    The already existing ISPConfig servers (also a mirror setup) use a different virtual ip address than the two new servers.
    I setup server ipv4 mapping where I've chosen the virtual ip address from the Source IP and setup the same ip address as the Destination IP.
    This seems to be working fine and after resyncing the website configuration I can see on the slave server that the vhost configuration now contains the ip address. I tried the same for the new servers but I am receiving an error message regarding the virtual ip address:
    1. Source IP can not be an IP of the Rewrite-Server
    Any thoughts on how to solve this or how to make sure the vhost configuration on my secondary server contains the new virtual ip address?
     

Share This Page