Improve Server Performance Using Nginx in cPanel

iginx
Setting Up Nginx as a Reverse Proxy

 

The following are the steps that need to be completed in order to successfully set up Nginx as a reverse proxy on the web host control panel.

 

  1. Edit SSH to server as root.

 

  1. Use ‘/usr/local/src’ as the directory (cd /usr/local/src).

 

  1. Get the latest and most up-to-date nginxadmin package.

 

  • wget http://nginxcp.com/latest/nginxadmin.tar
  • tar xf nginxadmin.tar
  • cd publicnginx
  • ./nginxinstaller install

 

  1. Install the newly downloaded package.

 

Once installation has completed, the Nginx Admin plugin should already be available in WHM. The Nginx process should already be running. This can be confirmed by running the command ‘ps aux | grep nginx’.

 

In the event that no process is shown, close httpd and have httpd restarted by running the following commands:

 

  • killall -9 httpd
  • /etc/init.d/httpd restart



Uninstalling Nginx Admin Plugin

 

For users who are not quite satisfied, which is unlikely to happen, with running both Apache and Nginx, uninstalling the plugin can be done through the following commands:

 

  • cd /usr/local/src
  • wget http://nginxcp.com/latest/nginxadmin.tar
  • tar xf nginxadmin.tar
  • cd publicnginx
  • ./nginxinstaller uninstall

 

Reminders

 

The Nginx Admin plugin should be on port 80, while the Apache plugin should be on another port, such as 8080. This way, both web-servers can be run and their beneficial functions enjoyed.

  • 96 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution