How to install Nginx on cPanel / WHM

How to install Nginx on cPanel / WHM

What are the first words that come to your mind when i say "Open Source Web Server?".

Unfortunately, Apache.

Well... it hadn't been for the Apache Software Foundation's strong grip on the web hosting industry ( and also Apache being shipped with all linux distros that are powering web hosting), most of us would have migrated to NGINX . It has an asynchronous architecture, it is more efficient, easier to configure and less demanding on system resources than Apache.

But …. my web host says Apache is the best choice ...

It's probably because your web host pushes you to use Apache in order to be able to upsell LiteSpeed, a paid extension when you are looking for performance.

So, let me tell how to install Nginx on your cPanel / WHM instance without losing your hairs. Please note that Easy Apache 4 offers an nginx module that I do not recommend you to install this experimental plugin which tends to throw 502 errors.

Enter Engintron, aCpanel plugin that allows you to add Nginx to WHM / Cpanel. To do this, open a terminal and type:

cd /
rm -f engintron.sh
wget --no-check-certificate https://raw.githubusercontent.com/engintron/engintron/master/engintron.sh
bash engintron.sh install

Once the installation is complete, go to the sidebar and select Engintron for cPanel / WHM. The configuration window below should then appear

If you are using cloudflare