Nginx (pronounced engine-x) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. It now hosts nearly 12.18% (22.2M) of active sites across all domains.
This server is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. Unlike traditional servers, this server doesn’t rely on threads to handle requests. Instead, it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.
Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from Nginx’s high performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.
Steps for installation
Follow the below steps to install nginx on the (cPanel) server.
cd /usr/local/src wget http://nginxcp.com/latest/nginxadmin.tar tar xf nginxadmin.tar cd publicnginx ./nginxinstaller install
Now Installation of Nginx on the server takes place, along with a cPanel plugin “NGinx Admin”
Probable Errors
1. If you get the following error during the installation,
Please upgrade cPanel to version 11.25 or above
It is because the Nginx installation script “Nginx installer” was set up. This is to check if the cpanel version is 11.25 or not. It will produce the above-specified error if the cpanel version is not 11.25.
To resolve this, open the “Nginx installer” script in the vi editor. Then change the cpanel version specified in the script to the corresponding one in the server. Save this and try again.
2. It may produce another error related to the Python version:
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
Check the latest Python package available with the OS repo. If it is version 2.4, then do not update it manually, which may cause conflicts with many other applications.
Instead, you can install Python 2.5 or later versions in any other location like /usr/local. Make sure that you have given the prefix while installing the new version as given below:
wget http://www.python.org/ftp/python/2.6/Python-2.6.tgz tar -zxf Python-2.6.tgz cd Python-2.6/ ./configure --prefix=/usr/local make make install
Then copy /bin/env to /usr/local/bin/env to properly parse Python scripts:
cp /bin/env /usr/local/bin/env
Now, you can continue with the Nginx installation:
./nginxinstaller install
Let us know if you face any problems.