To Gain Knowledge and to become a one, who all wants to become

Dreams are not those which are seen during sleep ,but Dreams are those which do not let you sleep,so see the dreams
and work hard to make them true.

Tuesday, September 11, 2012

NGNIX on Cpanel

Install Nginx on cPanel

The bright people over at http://www.nginxcp.com have come up with a wonderful little tool for working with Nginx. It integrates a admin panel into WHM so you can stop and restart Nginx, recreate the vhost config, view the Nginx Logs and check apache.

Also it autoconfigures WHM and Apache for use with Nginx by changing apache from listening on port 80 to port 8081.

For those who don't know what Nginx is its a caching proxy that will cache static content such as images and html files and serves them up without having to access Apache for the content thus improving speed, memory usage and processor overhead. All dynamic content such as php, java and video are proxied to Apache for processing.

So if you have a site that is slow you might benefit from Nginx serving up all the static content and only using Apache to process the php files..

Nginx Admin (Stable version) v3.2 for Cpanel Version 11.30 or above

Install Instructions:


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

If you receive any pyaml related error or the following 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
——————————

Then run execute following commands ….
For i686 architecture :-

# easy_install Pyyaml==3.09
# rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg

For x86_64 architecture :-

# easy_install Pyyaml==3.09
# rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg

Then Again run the following commands :-

# ./nginxinstaller install
# /etc/init.d/httpd restart

Now Nginx run on the port no:80 and apache run on the port no.8081.You can manage the nginx through WHM >> Main >> Nginx Admin



To uninstall nginx use following :-

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

1 comment:

  1. Bạn có thể đến trực tiếp tại Kim Hospital để được hỗ trợ thăm khám hoặc tư vấn miễn phí về các dịch vụ thẩm mỹ mắt đẹp tạo khóe mắt...Bạn sẽ có một số kiến thức thẩm mỹ nhất định cùng một sự trải nghiệm tuyệt vời!

    ReplyDelete