Save_domain.cgi for all domains

Installed:
Usermin 1.823
Webmin 1.974
Virtualmin 6.16

Instructions:

Configured, I get certificates from letsencrypt.
But: I modified the /usr/share/webmin/virtualmin-nginx-fpm/save_domain.cgi file to suit my needs (plugin: nginx + php-fpm), and I need to run save_domain.cgi for all domains so that it creates the “correct” config files of sites.
Actually, the question is: how can you execute the save_domain.cgi file for each domain? Those. do not go to the domain settings in Virtualmin and do not click “Save” for each site so that it resave the file /etc/nginx/sites-available/site.conf.*

  • means “save settings” with the “ssl” checkbox, which not all domains have.

If the answer has already been given, please bend me and show me where it is (English is not my first language).

Hi,

The question is – how can you execute the save_domain.cgi file for each domain … means “save settings” with the “ssl” checkbox, which not all domains have.

Yes, it is possible to enable Nginx SSL website feature for all domains using Virtualmin CLI, by running the following from a custom script:

#!/usr/bin/env bash
doms=`virtualmin list-domains --name-only --without-feature virtualmin-nginx-ssl`
for dom in $doms; do
   virtualmin enable-feature --domain $dom --virtualmin-nginx-ssl
done

Hello. By running the command:

sudo virtualmin list-domains --without-feature virtualmin-nginx-ssl

I am getting a bunch, list of domains. However: some (very many) are cropped. Example:

xn----7sbabecb1aslp6blcmwlcep5 XXX YYY

How to fix it?

Does the code exampled in my previous comment ran from a custom shell script works or fails? If fails what error does it return?

Apologizes, I forgot to include --name-only switch, so the command should be:

#!/usr/bin/env bash
doms=`virtualmin list-domains --name-only --without-feature virtualmin-nginx-ssl`
for dom in $doms; do
   virtualmin enable-feature --domain $dom --virtualmin-nginx-ssl
done