Steps to Install Nginx on a cPanel Server

Steps to install Nginx
Nginx is a web server, load balancer, and reverse caching proxy. This article will help you to install Nginx on a cPanel Server.

Setting up an Nginx reverse proxy is not a big deal at all. All you have to do is install the cPanel “Nginxadmin” plugin and which will set up an Nginx reverse proxy in your cPanel server.

 

Please follow the below steps.

 

1) Setup “Remote Access Key”.

Login to WHM.

Main >> Cluster/Remote Access >> Setup Remote Access Key.

Then click “Generate New Key”.

 

2) Install Nginxadmin

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

 

You may get the following errors.

 

./nginxinstaller install
 /usr/local/src/publicnginx
 Welcome to the Nginx Admin installer......Starting Install
 Generating vhosts...
 Traceback (most recent call last):
 File "/scripts/createvhosts.py", line 2, in ?
 import yaml
 File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py", line 26
 SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
 Installing WHM interface...
 deploying booster rockets
 Traceback (most recent call last):
 File "/usr/local/src/publicnginx/nginxinstaller2", line 9, in ?
 import createvhosts
 File "/usr/local/src/publicnginx/createvhosts.py", line 2, in ?
 import yaml
 File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py", line 26
 SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause

 

Don’t worry, “Nginxadmin” does provide a script to fix this issue.

Please follow the below steps.

cd /opt
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./pythonfix

 

After that, you can run the installer as per bellow,

./nginxinstaller install

 

It will install the Nginxadmin plugin in your system. Just restart Apache to activate the plugin.

/etc/init.d/httpd restart

 

So that’s how you set up cPanel Nginx.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

cPanel & WHM Management Services

Focus on your business, and let us take care of your cPanel Servers!
From what you are reading, it seems you are interested in cPanel/WHM and related technologies. If you have a moment to spare, please take a look at our cPanel Management Services plan, and which might interest you even more!
cPanel Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.