How to install cPanel plugin nginx

Post Reply
a24uall
Site Admin
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

How to install cPanel plugin nginx

Post by a24uall »

How can I instal free nginx plugin in cpanel?
INSTALLATION
cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller install
UN INSTALLATION
cd /usr/local/src
cd publicnginx
./nginxinstaller uninstall
Now login to WHM >> Main >> Nginx Admin to start / Stop nginx
Apache will be moved to port 8081 and Nginx will run on 80 port.
NOTE : PLEASE DONOT FORGET TO OPE PORT 8081
root@server # netstat -plan | grep httpd
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 22242/httpd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 22242/httpd
unix 2 [ ACC ] STREAM LISTENING 422759 22258/httpd /usr/local/apache/logs/fpcgisock
root@server [/]# netstat -plan | grep nginx
tcp 0 0 153.25.12.25:80 0.0.0.0:* LISTEN 22248/nginx
unix 3 [ ] STREAM CONNECTED 422698 22248/nginx
unix 3 [ ] STREAM CONNECTED 422697 22248/nginx
unix 3 [ ] STREAM CONNECTED 422695 22248/nginx
unix 3 [ ] STREAM CONNECTED 422694 22248/nginx
root@server [/]#
Arun
WebhostingDevelopment.com
a24uall
Site Admin
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

Re: How to install cPanel plugin nginx

Post by a24uall »

If you get an error like
root@server [/usr/local/src/publicnginx]# ./nginxinstaller install
/usr/local/src/publicnginx
Welcome to the Nginx Admin installer......Starting Install
Please Wait .......
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-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
Installing WHM interface...
Installing mod_rpaf...
Updating cPanel Configuration
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-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
root@server [/usr/local/src/publicnginx]#
SOLUTION :

STOP nginx and then uninstall that then run
cd /usr/local/src
cd publicnginx
./pythonfix
Now install again
./nginxinstaller install
Arun
WebhostingDevelopment.com
Post Reply

Return to “Webservers Installation”