Sales:  800-573-7846 or Live Chat

The ServInt Source

Installing Nginx on a cPanel server

tech bench 2Editor’s Note: As third-party software, ServInt does not support Nginx beyond installation. Also, to follow these instructions, users must have a working knowledge of the command line. Click here if you would like more information about logging into your server on the command line.

Nginx offers an alternative to the Apache web server popular with some server admins. Advanced users may choose to run Nginx instead of Apache, as it is believed to offer possible performance benefits in certain configurations. Read on if you are interested in installing Nginx on a server running cPanel.

The bare bones of the installation instructions for Nginx can be found here. The following are step-by-step instructions.

  1. Download the software.

Log onto your server via the command line and run the following:

cd /usr/local/src
tar xf nginxadmin.tar
cd publicnginx
  1. Generate a Remote Access Key.

Generate a key by logging into WHM, going to Clusters, then Remote Key Access, and then clicking Generate New Key.

  1. Install Nginx

From the command line, run the installation script:

./nginxinstaller install

If you get the following message, generate a new key and then run the script again.

access key doesn't exist
go to WHM > Cluster/Remote Access > Setup Remote Access Key
and click on the Generate New Key button

This Nginx installation method integrates with WHM/cPanel and uses the Apache configuration files that WHM/cPanel uses by default.

After installation you can go to WHM, Plugins, and Nginx Admin to handle Nginx. From there you can restart Nginx, edit the configuration files, view logs, and more.

You can also restart Nginx on the command line with the Apache command:

 /etc/init.d/httpd restart

About Bill Brooks

Bill Brooks is an Escalated technician and the Continuing Education Facilitator for ServInt's Managed Services Team. He is a life-long tech enthusiast and enjoys music, video games and hockey on the side.

The ServInt Source | Web Hosting Blog