Enable NGINX reverse proxy (Cpanel/WHM server)

A reverse proxy is an intermediate server that accepts a request from a client, forwards it to a server that can fulfil it and then returns the response from the server to the client. Using a reverse proxy offers several benefits including higher scalability, and flexibility as well as better security. However, another main reason behind their being commonly used is web acceleration or reducing the time taken to generate a response and returning it to the client.  In simpler terms, it means improving web page load times. The common web page acceleration techniques include compression, ssl termination and caching. Using an NGINX reverse proxy with your cpanel and WHM server brings all these benefits including improved caching and reduced load on the backend servers.

The reverse proxy stores a copy of the server’s response before forwarding it to the client. When the client or any client makes the same request, instead of forwarding the request to the backend server, it provides the client with response from the cache. It reduces the load on the backend server and also reduces the time it takes to provide a response to the client meaning improved page loading times. You can also benefit from Gzip and Brotli compression while using NGINX (pronounced engine) reverse proxy. When you are using NGINX reverse proxy, the information about your backend servers remains invisible to the clients outside your internal network which means that malicious clients will not be able to access them to exploit any vulnerabilities. If anybody tries to find out, he will know your website is hosted on NGINX server. Any information about the backend server remains secret.

Install NGINX reverse proxy (Cpanel/WHM server) -using Engintron plugin

You have two options to install NGINX reverse proxy on WHM server. You can install it using the NGINX manager in the software section of WHM or using a plugin. If you just need simple caching and reverse proxy for your website, you can easily mange with the NGINX manager. However, if you want the additional benefit of micro-caching and more features like the ability to edit NGINX files and restart NGINX and apache from a single interface, you can opt for Engintron.

 Engintron will improve the performance & web serving capacity of your server, while reducing CPU/RAM load at the same time. It does that by installing & configuring the popular Nginx webserver to act as a reverse caching proxy for static files (like CSS, JS, images etc.) with an additional micro-cache layer to significantly improve performance for dynamic content generated by CMSs like WordPress, Joomla or Drupal as well as forum software like vBulletin, phpBB, SMF, IPB or e-commerce solutions like Magento, OpenCart, PrestaShop and others.

Engintron

Installing Engintron is easy and does not require much technical knowledge and can be performed through just a few commands from the terminal.

Login to WHM as a root user. Go to terminal and enter the following command:

curl -sSL https://raw.githubusercontent.com/engintron/engintron/master/engintron.sh | bash -s -- install

If curl is not available on your system, you can use wget:

wget --no-check-certificate -O - https://raw.githubusercontent.com/engintron/engintron/master/engintron.sh | bash -s -- install

The installation process takes no more than a few minutes. Once the Installation is complete (you will see installation complete at the end), you can refresh the WHM and search for Engintron. It will be available in the plugin section. Click on it and you will see that Engintron is enabled. You can check NGINX status on the left side and restart Apache and Nginx if you need.

Go to your blog and check if it is loading fine. You will instantly feel the improvement in page load times when you are using NGINX reverse proxy. If your website does not load, there is no need to panic. You may just need to install some modules.

Go to WHM and search for Easy Apache 4. Check the currently installed package and click on customize. Go directly to the additional packages section, where you will find NGINX (if it is included in your current package). You can also install NGINX brotli, gzip and http2 modules here if you want. Enabling brotli will offer extra performance advantage. Easy apache 4 offers the advantage to enable brotli module easily for both apache and NGINX. Once you have installed NGINX, click on next at the bottom which will take you to review page. click on provision. This process will take only a few minutes. when you refresh your blog, it will be loading fine and faster. That's all about using Engintron to enable NGINX reverse proxy on your website.

Install Nginx reverse proxy using NGINX manager

In case you are not interested in microcaching and other things that come with engintron and only want the simple reverse proxy with caching, you can go for the NGINX manager in your WHM. Even with the basic caching and reverse proxy, you will enjoy significant performance gains.

Search for NGINX manager in WHM. It is available in the software section in the WHM. Click on it and you will be taken to the installation page. The NGINX manager allows for one click installation. Just click on it and within a few minutes, NGINX reverse proxy will be installed on your system. You can go back to the NGINX manager and then edit system settings or user settings for clearing cache or for managing caching and reverse proxy for individual sites if you have more than one on a single server. you will also find the option to restart NGINX here.

Uninstalling NGINX reverse proxy:

These were the two main methods available to WHM users for installing and managing NGINX reverse proxy. In case you ever need to uninstall the reverse proxy, it is not a tedious process either.

If you installed NGINX reverse proxy and caching using engintron, use the following command to uninstall engintron and remove reverse proxy with caching:

engintron remove

The above two words code will remove Engintron from your system and related files and settings. So, if you installed NGINX reverse proxy using Engintron, you will not need to worry since when you uninstall it, the changes will be reverted back and you will have your system just as it was before installation.

If you installed NGINX reverse proxy using the WHM Nginx manager, you have the option for one click uninstall like in the image below.

Just click on uninstall Nginx reverse proxy and within a few minutes, the system will uninstall it and revert the changes.