The purpose of this article is to provide simple installation steps for the cPanel-provided NGINX web server. NGINX is open-source software for web serving, reverse proxying, caching, load balancing, media streaming, and more.
To use NGINX, you need to enable PHP-FPM for all domains installed on the server by running the following command:
Note: On Cloudlinux servers the ea-nginx package belongs to the cl-ea4 repository instead. There is no ea4-experimental repository for Cloudlinux servers. So the package that you need to make sure that is installed on a Cloudlinux server is the cloudlinux-ea4-release package which you should be able to install with the following command:
yum install cloudlinux-ea4-release
Once you have installed the cPanel experimental repository, install NGINX by running the following command:
yum install ea-nginx.x86_64
The process will only change your Apache ports if your Apache configuration uses the default ports of 80 and 443.
Important configuration files after installing NGINX:
/etc/nginx/conf.d/ea-nginx.conf - Should not be change.
/var/log/nginx/domains/$domainname - $domainame to be replace with the real domain.
The basic installation of NGINX has been covered. For detailed information and details on how to customize NGINX refer to the following documentation: https://docs.cpanel.net/knowledge-base/web-services/nginx-with-reverse-proxy/