Installing Nginx is easy thanks to the Nginx Autoinstaller but if you want to use Nginx with Cpanel you can do that easily with NginxCP . NginxCP is a Nginx auto installer for Cpanel. NginxCP installs Nginx on the front end as a reverse proxy to Apache. So this means that static files will be handled by Nginx. NginxCP integrates seamlessly with Cpanel and you can just set it and forget about it. Installing it is very easy. But installing it on current production environments is not recommended because things might break depending on your Cpanel version.
cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller install
To uninstall just run
./nginxinstaller uninstall
That’s it. You can find the admin panel of NginxCP on WHM, its listed under “Plugins” So since the installation is complete. I have decided to run some benchmarks on this, I have installed NginxCP on 512MB OpenVZ SSH-Cached VPS with access to 1 2.4Ghz Core. I have tested simple php file which prints “Hello World” and a bare WordPress installation. Apache Bench is used to do the tests. Here are the results,
Results are impressive. Nginx shows the clear advantage when concurrency and requests increases.
Below are the results of WordPress. This is just the bare install without even touching the content of it. However I have enabled permalinks thus requiring mod_rewrite.
Nginx is the clear winner overall. Benchmarks are just for a reference, you can install NginxCP on your own server and see the changes yourself.
{ 0 comments… add one now }