cPanel is a popular Linux-based web hosting control panel with an attractive graphical interface and a bunch of automation tools that help simplify the process of hosting a site. By accessing cPanel through a standard web browser, you can control a wide range of options for website and server administration.
With Nginx becoming more and more popular among webmasters, more web hosting companies are switching over to Nginx. Nginx, having been created to work with multiple concurrent connections, does not slow down to a crawl when faced with heavy user traffic and therefore can be used to serve static content or as a reverse proxy balancer for Apache. Unfortunately, WHM/cpanel still doesn’t fully support Nginx.
If you’re looking to set-up a stand-alone Nginx or an Apache-Nginx hybrid web server for better speed, fortunately, there are plenty of ways you can install Nginx on cPanel until cPanel provides native Nginx support. In this article we shall explore the tried and tested methods of getting Nginx and cPanel to work seamlessly together for your websites. Some of these methods are provided for free, while some are paid.
Read also: Ten Great Advantages of Nginx
NginXCP, being one of the first Nginx + cPanel plugins that have surfaced online, it remains one of the most popular module that allows you to set up Nginx easily for free. It basically allows you to setup Nginx as a front-end reverse proxy of your cPanel server with Apache. This would cause static content to go to Nginx and dynamic content to go to Apache. Because Nginx handles static content better and Apache handles dynamic content better, performance inevitably increases. Nginx will also protect against attacks like DDOS because it passes only true http requests. In a nutshell, you can configure Nginx, rebuild the virtual hosts, or restart Nginx. There are plenty of tutorials to install Nginx on cPanel using the NginxCP installation script, so try any of them out and see how it goes for your server.
cPnginx, unlike NginXCP, is actually a commercial module available for cPanel. Of course, like a lot of paid products, cPnginx helps you do more things with much less effort. It has auto-installer, auto-update, and uninstaller scripts that make Nginx and cPanel integration much easier, but functionally, cPnginx is identical to NginXCP in a sense that all of the things you need are available in both modules. It’s really just a question of whether or not you’re willing to pay for automation and 24/7 technical support.
cPnginx licenses are sold starting at $5/month for individual servers and $3/month for reseller licenses with a minimum of 10 servers.
Engintron is a free Nginx + cPanel integration package that is said to be the lightest package available. People who’ve used it also claim that it’s the easiest to install/uninstall. Performance-wise, it handles reverse proxy operations as well as any other plugins. It features automatic updates, a powerful reverse-caching proxy, and a robust dashboard for managing Nginx. Since it’s free and easy to install/uninstall, you’ll want to try this package out before testing out the paid ones.
To date, nDeploy is the only plugin that provides a complete switch to Nginx + fpm, as other plugins only allow you to setup Nginx as a frontend which proxy pass connections to Apache. Formerly known as cpXstack, nDeploy now supports Coldfusion, nodeJS, Python, and Ruby on Rails in addition to PHP-FPM already available in cpXstack. Also, Nginx now automatically handles ipv6 and SSL from the cPanel configuration.
nDeploy also comes compiled with ngx_cache_purge, mod_pagespeed, and Phusion Passenger support. While the WHM interface isn’t as streamlined as one would expect, the features of nDeploy alone are enough to set this package apart from all the others.
UNIXY cPanel Varnish + Nginx
The cPanel Varnish + Nginx plugin by Unixy is said to run a lot faster than Litespeed and Lighttpd, with faster page loading and lower server load. With it you can easily uninstall or modify Varnish, refresh the Varnish cache, restart Varnish, etc. It comes with two web interfaces that serve to manage Varnish and Nginx using cPanel WHM. Because of the consolidated WHM interface, Varnish and Nginx become a lot easier to deal with.
UNIXY is just a little more expensive than other plugins available, but what you get in return is an intuitive user interface and helpful technical support team. UNIXY offers a 14-day free trial, so you may want to check it out.
Read also: How to Host Ghost on a Nginx Subdomain
With the wide range of modules and scripts made available for integrating Nginx and cPanel, it’s quite clear that there’s a rather slow transition happening from Apache to Nginx. It’s only a matter of time until cPanel decides to natively support Nginx, but until then, you’ll want to try out every plugin on this list and see which works best with your specific configuration.