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.
The cPanel provided NGINX is currently in an experimental state; To use NGINX, you would need to enable PHP-FPM and install the experimental cPanel repository, which we cover next.
To enable PHP-FPM for all domains installed on the server you can run the following command:
The experimental repository can be easily installed by running the following command:
yum install ea4-experimental.x86_64
Once you have installed the cPanel experimental repository, you can 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/third-party/nginx/.