Installing Nginx on a cPanel server
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.
- Download the software.
Log onto your server via the command line and run the following:
tar xf nginxadmin.tar
- 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.
- Install Nginx
From the command line, run the installation script:
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: