Installing Virtualmin
wget http://software.virtualmin.com/gpl/scripts/install.sh
Run the script to install Virtualmin.
sh /root/install.sh
Follow on-screen guide to install this.
systemctl stop apache2.service
Installing Nginx
Now that the Apache is not running, you’ll be able to install Nginx. The following command will install it on your Debian 9.x
apt-get install nginx
Now install Virtualmin modules to support Nginx and Nginx SSL,
apt-get install webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl
Installing PHP 7 Modules
I installed bunch of modules as I am running Magento 2.x
apt-get -y install php-fpm php-cli php-gd php-imagick php-mysql php-mcrypt php-pear php-curl php-intl php-xsl php-zip php-mbstring php-soap php-imap memcached php7.0-mysql php7.0-curl php7.0-gd php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php7.0-zip
Configuring Virtualmin to enable Nginx
The next and final step is to disable Apache and few other features. Go to System Settings -> Features and Plugins from your Virtualmin dashboard and,
Enable
Nginx website
Nginx SSL website
Disable
Apache website
SSL website
DAV Login
Mailman
Protected web directories
AWstats reporting
Subversion repositories
Nice! Thanks.
Thank you gary.