virtualmin list-domains --multiline
Setting all to FPM
Keep up with the times.
for domain in $(virtualmin list-domains –name-only); virtualmin modify-web –domain “$domain” –mode fpm; done
Turning of PHP logging for all
Consistency for all and exception handling when needed.
for domain in $(virtualmin list-domains –name-only); virtualmin modify-web –domain “$domain” –no-php-log; done
Checking for fcgid
sites
You probably want to just use FPM and have a more consistent system.
# grep -r fcgid /etc/webmin/virtual-server/
/etc/webmin/virtual-server/domains/157009083923628:php_mode=fcgid
/etc/webmin/virtual-server/domains/156986181552631:php_mode=fcgid
Now cat
those sites to see who they are. Better change ’em too.
Questions
Can you update the PHP version of disabled sites?
Yes
How do you purge the PHP 7.4 version?
First find all installed versions:
dpkg -l | grep '^ii' | grep '^ii php7.4'
Purge common, this will also uninstall libapache2-mod-php7.4
apt-purge php7.4-common
Check again using dpkg
.
How do you find all PHP 8.2 packages?
dpkg -l | grep '^ii php8.2'
How do I install PHP 8.4 on Ubuntu 20.04?
It’s not officially supported but you can do this:
sudo add-apt-repository ppa:ondrej/php
apt install php8.4-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}
List of all options to turn on/off 2025
virtualmin modify-web --domain name | --all-domains
[--mode mod_php|cgi|fcgid|fpm | --default-mode]
[--php-children|--php-children-no-check number | --no-php-children]
[--php-version num]
[--php-timeout seconds | --no-php-timeout]
[--php-fpm-port | --php-fpm-socket]
[--php-fpm-mode dynamic|static|ondemand]
[--php-log filename | --no-php-log | --default-php-log]
[--php-mail | --no-php-mail]
[--cleanup-mod-php]
[--proxy http://... | --no-proxy]
[--framefwd http://... | --no-framefwd]
[--frametitle "title" ]
[--matchall | --no-matchall]
[--includes extension | --no-includes]
[--default-website]
[--access-log log-path]
[--error-log log-path]
[--document-dir subdirectory |
--move-document-dir subdirectory |
--subprefix subdirectory |
--move-subprefix subdirectory |
--fix-document-dir]
[--port number] [--ssl-port number]
[--url-port number] [--ssl-url-port number]
[--fix-options]
[--letsencrypt-renew | --no-letsencrypt-renew]
[--break-ssl-cert | --link-ssl-cert]
[--enable-fcgiwrap | --enable-suexec |
--disable-cgi]
[--sync-tlsa]
[--add-directive "name value"]
[--remove-directive "name value"]
[--protocols "proto .." | --default-protocols]
[--ssl-cert file | --default-ssl-cert]
[--ssl-key file | --default-ssl-key]
[--ssl-ca file | --default-ssl-ca]
[--default-ssl-paths]
[--www-to-domain | --domain-to-www |
--subdomain-to-domain | --no-redirect]
Reference
Setting all to FPM
Keep up with the times.
Turning of PHP logging for all
Consistency for all and exception handling when needed.
Checking for
fcgid
sitesYou probably want to just use FPM and have a more consistent system.
Now
cat
those sites to see who they are. Better change ’em too.Questions
Can you update the PHP version of disabled sites?
Yes
How do you purge the PHP 7.4 version?
First find all installed versions:
Purge common, this will also uninstall
libapache2-mod-php7.4
Check again using
dpkg
.How do you find all PHP 8.2 packages?
dpkg -l | grep '^ii php8.2'
How do I install PHP 8.4 on Ubuntu 20.04?
It’s not officially supported but you can do this:
List of all options to turn on/off 2025
Reference