Nginx is another type of web server that we can see usually used on Many Linux servers. One of the key advantage of Nginx is their high capability to server static content over high traffic websites.

Today we are going to discuss how we can install and integrate Nginx on Webmin server.
  • By default Apache webserver comes with virtualmin installation. So first thing I looked at is whether I have Apache webserver running or not on my newly installed webmin server.
  • I accessed the webmin portal using the link like https://IPaddress:10000 and confirmed the Apache web server is installed and visible under server section.

  • I used below commands to shutdown apache.  In my case I have centos 7.
service httpd stop

chkconfig httpd off

  • Installed NGINX and started the service using below commands.
yum install epel-release

yum install nginx

systemctl start nginx

systemctl enable nginx

  • Installed Virtualmin’s Nginx plugin with below commands.

Downloaded module packages of wbm-virtualmin-nginx and wbm-virtualmin-nginx-ssl from the url using wget command.

http://software.virtualmin.com/gpl/wbm/

wget http://software.virtualmin.com/gpl/wbm/virtualmin-nginx-ssl-1.3.wbm.gz

wget http://software.virtualmin.com/gpl/wbm/virtualmin-nginx-1.8.wbm.gz
  • Once downloaded the module package,login to webmin panel >>Click webmin >> webmin configuration >> Webmin Modules >> Under install section choose “ From local file “ and browse file location >> Click install button

I followed this step because the yum install of wbm-virtualmin-nginx and wbm-virtualmin-nginx-ssl doensn’t work in my case and I haven’t found any way to download rpm version for the same. I am getting below error when I tried

yum install wbm-virtualmin-nginx wbm-virtualmin-nginx-ssl
No package wbm-virtualmin-nginx available.

No package wbm-virtualmin-nginx-ssl available.

Error: Nothing to do

  • After that I reload the Webmin control panel and  I am able to see the Nginx Webserver under Webmin -> Servers -> Nginx Webserver.
  • I clicked edit configuration file option available and can see the nginx install is detected by webmin.

  • Now I go Virtualmin area, and go to System Settings -> Features and Plugins.
  • Un-check the “Apache website” , “SSL website” and “DAV Login”, “Mailman”, “Protected web directories”, “AWstats reporting” and “Subversion repositories” features.
  • Check the “Nginx website” and “Nginx SSL website” features, then click “Save”.
  • As per virtualmin documentation they are recommending as, If Virtualmin reports that any other features cannot be used without Apache, go back and de-select them too. In my case there wasn’t any.

  • After that on Virtualmin section Click Server settings >> Recheck Configuration and see Plugin Nginx website is installed OK.

This concluded installation of Nginx on a webmin server with Centos 7. Now on we will be able to create virtual server  with “Enable Nginx Website “ feature.