The plugin described here has known compatibility issues with CentOS 7, and is unlikely to work with that version of CentOS. With older versions of CentOS, there may also be bugs and/or inconsistent behavior. Since the plugin is 3rd-Party, it is only supported on a Best Effort basis. Problems with the plugin itself should be directed to its developer.
By default cPanel uses Apache as the web server. However custom cPanel plugins have been created to take advantage of nginx's speed and utilize it as a reverse proxy.
Numerous articles can be found about the comparisons and differences between Apache and nginx, however this quote from WikiVS summarizes it nicely.
nginx is faster at serving static files and consumes much less memory for concurrent requests because Nginx is event-based it doesn't need to spawn new processes or threads for each request, so its memory usage is very low
Wordpress.com has found nginx to be the only load balancer able to handle 8000 live traffic requests per second.
For an automated installation script by KnownHost's Technical Staff, please scroll to the bottom of the page for further instructions.
By default, KnownHost's VPS's have the plugin directory created, however on plain vanilla installs of cPanel, you'll need to either create the apps directory (step 6). For KnownHost server's you can skip step #6.
Installing nginx as a reverse proxy on cPanel will require knowledge and use of SSH/Terminal commands. Also, please note this plugin is developed and supported by NginxCP and KnownHost can not be held responsible for any issues related to this plugin.
ssh root@<ip address> -p 2200
cd /usr/local/src
tar xf nginxadmin.tar
cd publicnginx
mkdir /var/cpanel/apps && chmod 755 /var/cpanel/apps
./nginxinstaller install
**************************************************** * Installation Complete * *run /etc/init.d/httpd restart to start Nginx Admin* ****************************************************
/etc/init.d/httpd restart
Restarting nginx daemon: nginxRemaining processes: 10207 .
/usr/local/cpanel/bin/register_appconfig /var/cpanel/apps/nginxcp.conf
* Which should result with output similar to this:
nginxcp registered
NginxCP (nginx as a reverse proxy) is now installed and can be viewed/accessed/configured via WHM. To access the Control Panel for nginx, visit your WHM Panel » Plugins » nginx Admin.
While using nginx as a reverse proxy has it's many benefits, not creating an automated temp cleanup can result in adverse performance.
crontab -e
(for edit) opens /var/spool/cron/root as a temporary file for editing purposes. Perform the following: crontab -e
0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client
[CTRL] + X
to save the changes. You'll be prompted, "Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?" Press Y
and then [Enter]
.[Enter]
at this time./usr/bin/crontab: installing new crontab
This script is meant for KnownHost's server only and should be used *at your own risk*.
Check out the GitHub Repository for this script: kh_nginxcp
Use of nginx with cPanel and WHM is not officially supported by cPanel.