Software Installs

Installing Nginx on a cPanel server

by Bill Brooks  • 

Editor’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 message, “access key doesn’t exist,” generate a new key and then run the script again.

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

If you have questions, please open a ticket in your customer portal.

Find out more about ServInt solutions

Starting at $69

  1. Of course, Nginx server much faster and productive than Apache. However, they are difficult to manage, thanks, I will try!
    Siarhei Kasukhin /
  2. Wanna be a ninjinx? Learn how to install #Nginx on a cPanel server.
  3. Want to run #Nginx instead of Apache? Check out this week's #TechBench.
  4. nice tutorial, with this nginx will be serve static content for effectively. good job bill.
    Andry Yudianto /
  5. Learn how to install #Nginx on a cPanel server in this week's #TechBench.
Bill Brooks

Bill Brooks

Escalated Technician, ServInt

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 New York Times
  • The Hill
  • Bloomberg
  • The Seattle Times
  • Computer World
  • Ars Technica