How to install and use NGINX in a Virtualmin hosted environment


Setting up and using NGINX with Virtualmin is well supported and dead easy. Instructions are already provided here but in this article we will give you a really quick overview of what needs to be done.

Why would you want to do this?

The reason why it’s better to use NGINX is for performance. NGINX simply outperforms Apache. ‘Nough said.

Important Note

It’s recommended that you do the NGINX conversion BEFORE you start hosting sites. Although Vander Host have converted existing Apache servers to NGINX after sites were already hosted, this will lead to a lot of configuration file work. It’s possible, but could be a daunting high pressure task if you are hosting many live sites already.

Steps to do the Conversion

Below are the steps outlined if you’re using Ubuntu/Debian or CentOS. Follow the steps for your operating system first, and then do the combined steps.

The Ubuntu/Debian Route

/etc/init.d/apache2 stop ; update-rc.d apache2 remove

apt-get install nginx

/etc/init.d/nginx start

apt-get install webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl

The CentOS Route

service httpd stop ; chkconfig httpd off

yum install nginx

/etc/init.d/nginx start

yum install wbm-virtualmin-nginx wbm-virtualmin-nginx-ssl

Combined Steps

Do these steps in Virtualmin for both Ubuntu/Debian and CentOS.

System Settings->Features and Plugins

  1. Uncheck "Apache website" , "SSL website", "DAV Login""Protected web directories",  and "AWstats reporting"
  2. Check "Nginx website" and "Nginx SSL website" features, then click “Save”.

Congratulations! You are now serving your sites with at least twice the speed than before.


Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top