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.