Installing ClusterControl with Nginx! Alex June 02, 2026 03:44 Updated Follow Phil Bayfield as written an excellent article on how to install ClusterControl and make it work with Nginx instead of the default Apache server. Please read the post here. Related articles Installing ClusterControl Standby Server Minimal GRANTs for MySQL Based Clusters (Galera, Replication, NDB/MySQL Cluster) How To Change the Default HTTP Port (80) For ClusterControl Workaround for MariaDB 10.3 deployment failure on ClusterControl Passwordless SSH in Encrypted Home Directory Comments 2 comments Sort by Date Votes Premium Pest Control July 14, 2020 08:42 Very Useful article thanks for sharing a valuable content. 0 Comment actions Permalink Social For You January 07, 2026 10:02 Edited Phil’s guide (and the official docs) recommend installing ClusterControl using the default installer first, which deploys the web UI and API under Apache: wget https://severalnines.com/downloads/cmon/install-cc chmod 755 install-cc ./install-cc This sets up: ClusterControl UI CMON API Apache with necessary configsEven if you plan to use nginx, installing Apache first ensures all files are placed correctly. 🧱 2. Disable/Stop Apache Stopping Apache prevents it from occupying ports 80/443 and avoids conflicts with nginx: Systemd (CentOS/RHEL/Ubuntu newer systems) sudo systemctl stop httpd sudo systemctl disable httpd Debian/Ubuntu (legacy) sudo service apache2 stop sudo update-rc.d -f apache2 remove This keeps Apache installed (so ClusterControl files remain intact) but inactive. 📦 3. Install nginx + PHP-FPM ClusterControl requires PHP to render and process its UI and API. nginx doesn’t include PHP — instead it passes requests to php-fpm: On CentOS/RHEL: sudo yum install nginx php-fpm -y On Debian/Ubuntu: sudo apt-get install nginx php5-fpm -y (Use the appropriate PHP-FPM package for your distro and PHP version.) 📄 4. Create nginx Site Configuration Here’s a working nginx server block based on Phil Bayfield’s example that handles both the ClusterControl UI and the CMON API: server { listen 80; server_name yourdomain.com; access_log /var/log/nginx/clustercontrol-access.log; error_log /var/log/nginx/clustercontrol-error.log; root /var/www; index index.php; # Deny .htaccess files location ~ \.htaccess { deny all; } # Pass all php requests to php-fpm location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } # Handle ClusterControl UI location /clustercontrol { alias /var/www/clustercontrol/app/webroot; try_files $uri $uri/ /clustercontrol/app/webroot/index.php; } # Needed for UI access (handles query strings properly) set $is_args_amp ""; if ($is_args != "") { set $is_args_amp "&"; } # Handle internal /access calls location ~ "^/clustercontrol/access/(.*)$" { try_files $uri $uri/ /clustercontrol/app/webroot/access/index.php?url=$1$is_args_amp$args; } # Handle CMON API location ~ "^/cmonapi/(.*)$" { try_files $uri $uri/ /cmonapi/index.php?url=$1$is_args_amp$args; } } A few notes about this snippet: starbucks menu alias points to ClusterControl’s webroot. fastcgi passes PHP execution to php-fpm. Regex locations ensure the UI and API routes work with query strings (similar to Apache’s mod_rewrite). 🔁 5. Restart Services Once nginx config is in place: sudo systemctl enable nginx php-fpm sudo systemctl restart php-fpm sudo systemctl restart nginx Now nginx serves the ClusterControl UI/API on port 80. You can add SSL later to serve it on HTTPS (port 443). 0 Comment actions Permalink Please sign in to leave a comment.
Comments
2 comments
Very Useful article thanks for sharing a valuable content.
Phil’s guide (and the official docs) recommend installing ClusterControl using the default installer first, which deploys the web UI and API under Apache:
wget https://severalnines.com/downloads/cmon/install-cc chmod 755 install-cc ./install-ccThis sets up:
ClusterControl UI
CMON API
Apache with necessary configs
Even if you plan to use nginx, installing Apache first ensures all files are placed correctly.
🧱 2. Disable/Stop Apache
Stopping Apache prevents it from occupying ports 80/443 and avoids conflicts with nginx:
Systemd (CentOS/RHEL/Ubuntu newer systems)
sudo systemctl stop httpd sudo systemctl disable httpdDebian/Ubuntu (legacy)
sudo service apache2 stop sudo update-rc.d -f apache2 removeThis keeps Apache installed (so ClusterControl files remain intact) but inactive.
📦 3. Install nginx + PHP-FPM
ClusterControl requires PHP to render and process its UI and API. nginx doesn’t include PHP — instead it passes requests to php-fpm:
On CentOS/RHEL:
sudo yum install nginx php-fpm -yOn Debian/Ubuntu:
sudo apt-get install nginx php5-fpm -y(Use the appropriate PHP-FPM package for your distro and PHP version.)
📄 4. Create nginx Site Configuration
Here’s a working nginx server block based on Phil Bayfield’s example that handles both the ClusterControl UI and the CMON API:
server { listen 80; server_name yourdomain.com; access_log /var/log/nginx/clustercontrol-access.log; error_log /var/log/nginx/clustercontrol-error.log; root /var/www; index index.php; # Deny .htaccess files location ~ \.htaccess { deny all; } # Pass all php requests to php-fpm location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } # Handle ClusterControl UI location /clustercontrol { alias /var/www/clustercontrol/app/webroot; try_files $uri $uri/ /clustercontrol/app/webroot/index.php; } # Needed for UI access (handles query strings properly) set $is_args_amp ""; if ($is_args != "") { set $is_args_amp "&"; } # Handle internal /access calls location ~ "^/clustercontrol/access/(.*)$" { try_files $uri $uri/ /clustercontrol/app/webroot/access/index.php?url=$1$is_args_amp$args; } # Handle CMON API location ~ "^/cmonapi/(.*)$" { try_files $uri $uri/ /cmonapi/index.php?url=$1$is_args_amp$args; } }A few notes about this snippet: starbucks menu
aliaspoints to ClusterControl’s webroot.fastcgipasses PHP execution to php-fpm.Regex locations ensure the UI and API routes work with query strings (similar to Apache’s mod_rewrite).
🔁 5. Restart Services
Once nginx config is in place:
sudo systemctl enable nginx php-fpm sudo systemctl restart php-fpm sudo systemctl restart nginxNow nginx serves the ClusterControl UI/API on port 80. You can add SSL later to serve it on HTTPS (port 443).
Please sign in to leave a comment.