Virtualmin

Configuring Nginx support in Virtualmin

a. Clean installation as LEMP stack

Automated installation: During Virtualmin installation, use the --bundle LEMP option with the virtualmin-install.sh script. This sets up a LEMP (Linux, Nginx, MariaDB, PHP) stack.

sudo /bin/sh install.sh --bundle LEMP --minimal

b. Manual switch from Apache to Nginx
Disable Apache and derivatives

systemctl disable --now apache2

Disable Apache as Virtualmin feature

virtualmin set-global-feature --disable-feature web --disable-feature ssl

Install Nginx and dependencies Debian and derivatives

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

Configure Virtualmin for Nginx

virtualmin-config-system -i Nginx Switching from Nginx to Apache Disable Nginx: Disable Nginx. RHEL and Debian derivatives systemctl disable --now nginx Disable Nginx as Virtualmin feature virtualmin set-global-feature --disable-feature virtualmin-nginx --disable-feature virtualmin-nginx-ssl Install Apache: Install the Apache package along with necessary modules. Debian and derivatives apt-get install apache2 libapache2-mod-fcgid apache2-suexec-custom RHEL and derivatives dnf install httpd mod_fcgid mod_ssl mod_http2 Configure Virtualmin for Apache virtualmin-config-system -i Apache Enable Apache as Virtualmin feature virtualmin set-global-feature --enable-feature web --enable-feature ssl