Cluster slave web interface

Discussion in 'ISPConfig 3 Priority Support' started by Robert Heessels, Dec 17, 2018.

  1. Robert Heessels

    Robert Heessels New Member

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess Florian does not install the interface on the second node. In an older version of the tutorial which was written by me, I've described the installation of the ISPConfig UI on the second node. When you do that, then the interface config.inc.php file must be modified to connect to dbispconfig1 instead of dbispconfig2 on the second node.
     
  3. Robert Heessels

    Robert Heessels New Member

    Clear!
    Can I run the `php -q install.php` command once more, or do I first need uninstall something?
    Or is there a separate way to enable the web interface?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The installer cannot be run again and uninstalling one node in the cluster is not a good choice. Try this: copy the ispconfig.vhost file from server1 /etc/apache2/sites-available/ to server2. Then copy over the ispconfig vhost symlink from /etc/apache2/sites-enabled/ (or create a new symlink with that name) and restart apache.
     
  5. Robert Heessels

    Robert Heessels New Member

    I use Nginx (on Ubuntu 18.04). Copied the niginx confs from the master to the slave.
    Problem now is that /var/lib/php7.2-fpm/ispconfig.sock is missing.
    Any ideas?
     
  6. Robert Heessels

    Robert Heessels New Member

    I got it working by using fastcgi_pass unix:/run/php/php7.2-fpm.sock; instead of ispconfig.sock. Not sure if ispconfig.sock does something important or how it can be installed?

    I also had to change group rights to config.inc.php and temp. Is that okay?

    Web interface is now showing, but no clients etc. What database/server do I now set? And in `db_database` or in `dbmaster_database`? I want it to use the slave's own replicated database; not connect to the master. So it can still function when the master is offline.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The php7.2-fpm.sock runs udner a wronbg user (www-data) instead of the user ispconfig. That's why you had to alter permissions of the config files. Basically, you opened a security hole with that as other applications run as www-data too and if one of them gets hacked, the attacker will get access to the ispconfig database and can take over your server. I won't run ispconfig under www-data user.

    The interface must always connect to the master database. Yoz can use the replicated instance on the slave for that.
     
  8. Robert Heessels

    Robert Heessels New Member

    Not good indeed. I was suspecting that.
    So how can I get/restore ispconfig.sock?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess the ispconfig php fpm config is missing. Try to copy it over the pool file for the from master server and restart the php fpm daemon.
     
  10. Robert Heessels

    Robert Heessels New Member

    That worked!
    Till, you are amazing. Thank you for all the help. Thank you for Ispconfig. This all is a huge blessing to me and I really appreciate it! <3
     
    till likes this.
  11. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Hello,
    I reply in that thread even if very old because, at the beginning, it mentions exactly what I would like to do :
    Install ISPConfig Web Interface on my slave server.
    I understand that I should
    How can I do that ? It's not clear to me.
    Thank you :)
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Note first, that ISPConfig web interface can not be run on two servers. So if you install in on a slave, it must be removed from master.
    Till probably means editing file /usr/local/ispconfig/interface/lib/config.inc.php which can be found with command
    Code:
    locate config.inc.php  | grep ispconfig
    Why do you need to do this? Some users have a separate host that runs only ISPConfig web interface, that might be best option if for some reason running web interface on the web server is not possible.
     
  13. francoisPE

    francoisPE Active Member HowtoForge Supporter

    My idea was to use ISPC web interface on mirror server in case of main server down for any reason (let say maintenance)
    Is it possible to switch web interface from one server to a mirror (for a maintenance time) ? If yes, how can I do that.
    Looking at /usr/local/ispconfig/interface/lib/config.inc.php, my feeling is that I can scp that file on my mirror server to make it becomes new web interface with history/db. Is it enough ?
    I well understand that it is impossible to have web interface on 2 servers at the same time. I am looking for a solution for maintenance, backup or definitive swap...

    You are right. In case swap web interface server is impossible, a separate web interface on a "small VPS" server is a good solution to limit broken server risks on production...
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes and no. You can use the interface on the second node while the first node is down, but all changes will remain in the queue for both systems until the first server is up again.

    Yes, for larger installations it's recommended to run a separate server just for the UI.
     
  15. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  16. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Thank you so much :):):)
     
  17. francoisPE

    francoisPE Active Member HowtoForge Supporter

    I would like to propose a small evolution. Don't know what you'll think about...
    On server without web interface (let's call it 'servwowebisp.domain.tld') it is impossible to connect to phpmyadmin, roundcube, mailman, etc... using cert edited by ispconfig for 'servwowebisp.domain.tld', calling it like servwowebisp.domain.tld:8080/phpmyadmin
    The solution, I set up is to create a domain in ispc : 'servwowebisp.domain.tld', to call with servwowebisp.domain.tld:80/phpmyadmin
    My proposal would be add during ispconfig set up a vhost to "proxypass ispconfig web interface" on servwowebisp.domain.tld:8080
    This would give access to web interface on all servers and creates a similar access on all servers.
    What do you think ?
     
  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    This is what I do manually right now and why I prefer this method over getting certs through the installer. But there is no need for a proxypass to use this.
     
  19. francoisPE

    francoisPE Active Member HowtoForge Supporter

    ProxyPass would be a plus to have access on all servers in same ispconfig... (if you have several ispconfig clusters, you don't have to remember, on which one you are...)
     
    Last edited: Jan 11, 2021

Share This Page