Multi-Server Setup -> Display GUI on Slave Server

Discussion in 'Installation/Configuration' started by SimonK, Sep 27, 2020.

  1. SimonK

    SimonK New Member

    Hello all,
    OS: Ubuntu Server 18.04 LTS
    ISP: 3.1.15p3
    Setup: Master acting as Mailserver (1), Slave Server acting as Webserver (1)

    Challenge:
    ISP GUI is currently complete on Master Server, means I do see Master and Slave server in there. On Slave Server, I do only see slave server itself in ISP GUI. Because Slave Server is acting as Webserver, I would like to use ISP GUI here and turn apache completely off on Master Server. Would this be possible? Furthermore, Sync of ISP is working between Master and Slave as far as I see, because Webserver settings of Slave Server I do see in ISP GUI of Slave and Master Server.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Only the master server may run a GUI if it's not a mirror system. Your current setup is already broken due to the wrong installation choices you've made, so the best is that you reinstall it from scratch and this time, install webserver first, as master, and then install mail server, as slave, and take care to not install the GUI on the mail system.
     
  3. SimonK

    SimonK New Member

    Hello Till,
    Thanks very much for the fast reply. GUI on master is ok, but I really like to have it also on the slave. I tried to adjust the DB settings in interface/lib on slave and put in the DB Server of master but login did not work afterwards. Is there no chance to get the GUI working with the ispdatabase on different server?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This should work. If login fails, then you have to add a new user 'ispconfig' for the hostname and Ip of the second node in the MySQL server of the master.
     
    SimonK likes this.
  5. SimonK

    SimonK New Member

    Hi,
    Thanks again. I did just copy $conf['dbmaster_host'] to $conf['db_host'], $conf['dbmaster_user'] to $conf['db_user'] and $conf['dbmaster_password'] to $conf['db_password']. So I think this should the trick? In this case also the access should already be guaranteed, isn't it?

    However, Login Fails, also the webGUI looks bit strange because isp logo is missing. File attached. Hopefully you can help me out here.

    Detailed Config.
    Code:
    //** Database
    $conf['db_type'] = 'mysql';
    #$conf['db_host'] = 'localhost';
    $conf['db_host'] = '192.168.10.71';
    $conf['db_port'] = '3306';
    $conf['db_database'] = 'dbispconfig';
    #$conf['db_user'] = 'ispconfig';
    $conf['db_user'] = 'ispcsrv2';
    
    #$conf['db_password'] = '<pw1>;
    $conf['db_password'] = '<pw2';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;
    
    define('DB_TYPE',$conf['db_type']);
    define('DB_HOST',$conf['db_host']);
    define('DB_PORT',$conf['db_port']);
    define('DB_DATABASE',$conf['db_database']);
    define('DB_USER',$conf['db_user']);
    define('DB_PASSWORD',$conf['db_password']);
    define('DB_CHARSET',$conf['db_charset']);
    
    
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = '192.168.10.71';
    $conf['dbmaster_port']                  = '3306';
    $conf['dbmaster_database']              = 'dbispconfig';
    $conf['dbmaster_user']                  = 'ispcsrv2';
    $conf['dbmaster_password']              = '<pw2>';
    $conf['dbmaster_new_link']              = false;
    $conf['dbmaster_client_flags']  = 0;
    
     

    Attached Files:

  6. SimonK

    SimonK New Member

    I did check the mysql priviliges after I reread your answer Till and saw that ispcsrv2 only has limited access rights. Furthermore also that
    ispconfig only has local priviliges, no for remote even when login was possible. I thought when I can login, then I have same rights for local and remote... but that's wrong. However, created a new user and added all priviliges on dbispconfig to this account for the remote server and it's working now. Great thanks to Till.

    Code:
    create user 'ispconfig_slave'@'192.168.10.61' identified by 'pw';
    grant all privilges on dbispconfig.* TO 'ispconfig_slave'@'192.168.10.61';
     

Share This Page