By default the Linux server is already loaded with Apache but WHM server does not provide any support for Nginx web server. To make your website both effective and powerful then you need both web servers Apache and Nginx. Nginx web server is mainly responsible for website’s speed and apache makes it powerful with its inbuilt features. In this article we are going to discuss that how to install Nginx web server as n reverse proxy server. But first we are going to explain about the advantage of Nginx server as a reverse proxy on cpanel server.
Why we have to run Nginx and apache both on server?
Apache is an open source web server which is based on UNIX operating system. It is mostly used web server and available for free. Apache is reliable, fast and secure web server. As already discussed Nginx increase the speed of website so if we set Nginx as reverse proxy server then it can increase the speed and performance both.
Now we all know about the Nginx server and why we have to use it so now it’s time to install Nginx web server as a reverse proxy server.
How to install Nginx as a reverse proxy on cpanel server?
1. Login to server via SSH access.
2. After login change to src directory with below command:
3. Now download the plugin with wget command:Code:cd /usr/local/src
4. The downloaded file is in tar format so you have to extract the compressed plugin:Code:wget http://nginxcp.com/latest/nginxadmin.tar
5. Change the directory through:Code:tar xf nginxadmin.tar
6. Now create the directory for apps with the below command:Code:cd publicnginx
7. With the install tag run the installer program:Code:mkdir /var/cpanel/apps && chmod 755 /var/cpanel/apps
8. After all the above steps the nginx option is now available user plugins section in WHM. You can check it with the following command :Code:./nginxinstaller install
9. If you didn’t find any processes then you restart the apache with following command:Code:# ps aux | grep nginx
Code:#killall -9 httpd #/etc/init.d/httpd restart