How to Install, Activate Nginx Admin on Your Web cPanel WHM

Tutorials, guides and know hows useful on the World Wide Web: social networking, web design, programming, domains, hosting and more.

How to Install, Activate Nginx Admin on Your Web cPanel WHM

Postby HowTutor » 24 Sep 2015, 10:22

The following tutorial will show how to install and activate Nginx Admin on Your cPanel WHM. First, a brief intro.

About Nginx
Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.
Unlike traditional servers, Nginx doesn't rely on threads to handle requests. Instead it uses a much more scalable event-driven architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.

NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

About Nginx Admin
Nginx Admin is WHM interface of Nginx installer for cPanel server. This plugin will increase your server performance and decrease the server Apache Load. So you can host more websites in a cPanel server than usual.

Installing Nginx Admin
We will install Nginx Admin by executing the following commands through SSH client. You have to login as root.

Requirement
To run the command line interface, you need to connect to your server via an SSH client like PUTTy. (Tutorial on how to do this coming soon)

Steps:
After login as root via the SSH client interface, run the following commands in succession:

1. Download the Nginx Admin software:

Code: Select all

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


2. Install the software:
Run the following command

Code: Select all

./nginxinstaller install

Nginx-Installation.jpg
Nginx Install
Nginx-Installation.jpg (101.61 KiB) Viewed 2343 times


Possible errors:
a. If installing Nginx Admin for the first time ever on your server, there is a probable Python Error you may encounter which says:

SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause...


The solution is to run a pythonfix script with the following command, starting over:

Code: Select all

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


After that you can run installer finally:

Code: Select all

./nginxinstaller install


If still not solved, you need to install an alternative python version for the purpose of this installation. A tutorial is found here @ http://www.nginxcp.com/forums/Thread-py ... 17#pid4017 .

b. Another error you could get at installation stage has to do ith cPanel Remote Access Key:
The cPanel Remote Access Key (hash) hasn't been generated yet. Do so before running this installer
or
access key doesn’t exist

This means that your cPanel remote access key is not setup. You can either do so via WHM -> Setup Remote Access Key or
Execute the command below via SSH as root:

Code: Select all

 export REMOTE_USER=root
 /usr/local/cpanel/bin/mkaccesshash


Now, finish the installation, by starting over.

After successful installation, Nginx Admin is installed as a plugin in your WHM. Access this to configure it via

WHM => Plugins => Nginx Admin

Activate Nginx in your server using the command:

Code: Select all

/etc/init.d/httpd restart


To test if everything is successfully running, view the header response of your web pages and the server should return nginx.


How to uninstall Nginx Admin:

Code: Select all

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


The above is a complete tutorial on Nginx integration into your server via Nginx Admin plugin.

Return to “The Internet, Web”

Online now

Users browsing this section: No registered users and 1 guest