If you want to add to every new virtual server that you create these directives
## manually added by mark 2021-01-30
ServerAlias *.mydomain.com
Virtualmin → System Settings → Server Templates - Select Default Settings (or as appropriate) and then in the drop down box “Website for Domain”. For Apache (but not Nginx) you will see a box Directives and settings for new websites; add the directives there.