Installing Nginx in Cpanel Server using nginxcp

Posted by cikul | Posted in cpanel, Linux | Posted on 20-09-2011-05-2008

0

NginX is the fast webserver with high performance and low resource.Many enterprises, such as WordPress and Comodo, already switched to NginX as it proves to be the most powerful web-server .

Nginx can work as a front end reverse proxy of your cPanel server along with apache. Which will increase the performace.

The Nginx Admin (nginxcp) is a cPanel nginx integration plugin. This plugin will increase your server performance and decrease server loads cased by apache.

With nginxcp you can easily install nginx to run with your existing cpanel + apache installation, and with easy user interface in WHM to manage.

You can download nginxcp freely at http://nginxcp.com

Here is nginxcp installation instruction :

cd /usr/local/src
wget http://nginxcp.com/nginxadminx.x-stable.tar
tar xf nginxadminx.x-stable.tar
cd publicnginx
./nginxinstaller install
#crontab -e

add this in crontab :

*/30 * * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client

Note:
change x.x with latest nginxcp version, if you have previously installed the any version of the nginx, please uninstall and then perform the installation.

Uninstall Instruction:

cd /usr/local/src
wget http://nginxcp.com/nginxadmin2.8-stable.tar
tar xf nginxadmin2.8-stable.tar
cd publicnginx
./nginxinstaller uninstall

Troubleshooting guide :

Some problem maybe appear when you installing nginxcp, i have same problem when installing nginxcp, i’ve got this error :

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

some people solved the problem with updating cpanl using command /scripts/upcp –force, but it not work for me.

If you still have same problem like that, you can follow this instruction :

# cd /usr/lib/python2.4/site-packages
# mv PyYAML-3.10-py2.4-linux-x86_64.egg PyYAML-3.10-py2.4-linux-x86_64.egg_
# wget http://dhika.cikul.or.id/upload/PyYAML-3.09-py2.4-linux-x86_64.egg
# cd /usr/local/src
# wget <a href="http://nginxcp.com/nginxadmin2.6-stable.tar" target="_blank">http://nginxcp.com/nginxadminx.x-stable.tar</a>
# tar xf nginxadmin2.6-stable.tar
# cd publicnginx
# ./nginxinstaller install

And it’s works for me.

Share and Enjoy

Write a comment

*