NGINX on Cluster - Sites Not Created

Discussion in 'Installation/Configuration' started by AustJames, Feb 24, 2016.

  1. AustJames

    AustJames New Member

    Hi Everyone,
    Hoping someone can please point me in the right direction regarding a problem on NGINX in a cluster config.
    I am currently running a cluster with dedicated ISPConfig control panel, 2 name servers, 1 apache server, 1 MySQL server without any problems; however I have added an NGINX web server to the cluster and when creating a new site and specifying the NGINX server the website is not being created on the new NGINX server. I do not have this issue with apache and everything else is running fine.

    All servers in the cluster are running on Debian Jessie with the exception of the NGINX server which is running CentOS 7.

    To configure the NGINX server I followed the CentOS 7 perfect server tutorial and only configured NGINX, MariaDB, PureFTP and ran the ISPC installation in expert mode. Configured as per usual and selected the option to configure NGINX during the ISPC configuration. Everything seemed to go well and the server was displayed in the ISPC control panel as NGINX with the server presenting itself when adding a website for the domain.

    When accessing the domain I see the generic NGINX Fedora welcome screen; however when I look at /var/www/ on the NGINX server the client and web files are not created. I also cannot connect via FTP as I get an invalid password error. Could it be that ISPC cannot connect to the NGINX server to deposit the default site files and also cannot create FTP accounts on that server? Could it be something to do with connectivity/permissions between ISPC and the NGINX server? I have re-checked the config and everything should be ok.

    If anyone can point me in the right direction as to what the root cause could be it would be much appreciated.

    Cheers

    James
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The most likely reason is that the ispcsrv* mysql user user that is defined in the master mysql database can not connect from the slave. This happens when the hostname id not set correctly for both server in both /etc/hosts files before ISPConfig is installed.
     
  3. AustJames

    AustJames New Member

    Hi Till,
    Thanks for the reply.
    I have fixed the issue. Here is what I did:

    1. ISPC Master Database: Removed all privileges assigned in the master database for the NGINX server hostname & IP against the users ispcsrv* and root.
    2. ISPC Master Database: Added privileges back to the root user on the Master Database allowing access to MariaDB on the NGINX server as per this script:

    Code:
    CREATE USER 'root'@'10.1.1.1' IDENTIFIED BY 'rootPassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'10.1.1.1' IDENTIFIED BY 'rootPassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
    Where 10.1.1.1 is the IP address of the NGINX server.

    3. Restart Master DB.
    Code:
     service mysql restart 
    I thought
    Code:
     FLUSH PRIVILEGES; 
    would be sufficient instead of restarting the Master DB, but it only worked for me after the DB restart.

    Step 1 was probably not required if I simply restarted the the ISPC Master Database service.

    Thank you

    James
     

Share This Page