The WHM/cPanel is installed in the Apache Web server environment by default,Nginx is a free and open high-performance HTTP and proxy server environment. After we install the Nginx Admin plug-in in WHM, we will use Nginx as Apache's reverse proxy to process static content (such as text, images, CSS, etc.), while Apache is only responsible for processing dynamic pages. It can improve the website loading speed and consume less system resources.
The installation of Nginx Admin is very simple. At present, the latest version is 1.2.6, and the existing site access will not be affected.Log in to the server as root and execute the following code.
cd /usr/local/src wget http://nginxcp.com/latest/nginxadmin.tar tar xf nginxadmin.tar cd publicnginx ./nginxinstaller install
If the official direct installation fed back by enthusiastic readers is unsuccessful, the following installation process can be used:
cd /usr/local/src wget http://nginxcp.com/latest/nginxadmin.tar tar xf nginxadmin.tar cd publicnginx ./pythonfix mv “/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg” “/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg.bak” ./nginxinstaller install
Nginx Admin uses
After installation, Nginx Admin, as a WHM plug-in, can log in to the WHM background, select Plugins, and Nginx Admin will arrive at the graphical interface.
As shown in the figure above, if you need to clean the cache regularly, you can add the automatic tasks it provides to cron (crontab - e).
The background can restart nginx, view logs, and rebuild vhosts.
Nginx Admin Uninstall
If you are not used to it or do not like it, you can uninstall it at any time.Just run the following code.
cd /usr/local/src wget http://nginxcp.com/latest/nginxadmin.tar tar xf nginxadmin.tar cd publicnginx ./nginxinstaller uninstall
In general, Nginx performs better than Apache under high load, and it is lighter than Apache and more efficient in handling static content. Friends who use the WHM/cPanel can still try it.