Server Templates > Settings For Sub-Servers > Website for subdomain > These options have these values:
[Redirect webmail.${DOM}] no
[Redirect admin.${DOM}] no
Server Templates > Settings For Sub-Servers > DNS Domain > These options have these values:
[Address records for new domains] Domain name www ftp localhost m
I have searched a lot and found theses posts but still can’t make it work:
I think the OP wants to create sub-server without these additional sub-domains so forcing the clients to use the parent domain for webmail, admin login and for the mail server. Also he does not want the www for each of the sub domains
So the admin and webmail sub-domains can be turned off in the server template already, at least in theory. However, it looks like the real issue is that for sub-domains that setting isn’t being respected, at least when using Nginx.
It works both in theory and in practice! We recently fixed it, I remember it. @dubansoft Please make sure that you have the latest Virtualmin Nginx 2.36 plugin version installed!
It also worked fine for me when a template for Sub-servers wasn’t saved (inherited from Default settings). After it was saved manually, all options were correctly applied when a new virtual server was created, even if the options in the default and sub-server templates were different.
However, I encountered another, not directly related issue – Permissions on website subdirectory field was empty and just saving the form resulted in the following error:
Failed to save server template : Missing or invalid permissions for website subdirectory
But setting it manually to 0750 worked as expected.
@Jamie, after running deeper tests there are actual bugs:
When in Template → DNS domain page, under Address records for new domains option the admin un-ticks www. the records in DNS are correctly not created, however, those are still added in the webserver config, for both Apache and Nginx;
The mail. record seems to always be created, even if mail for the domain is disabled. That doesn’t seem right, as there should be a way not to create it at all.
m.${DOM} option still present in the UI, under Address records for new domains option, even though not created anywhere.
Actually, my users will never know about the existance of an admin, webmail, or mail services as i deploy a custom app to my users. Also, i need those subdomains not to be created because i use a wildcard on my dns setting, so *.mydomain.com will get a Let’s encrypt certificate automatically.
When virtualmin creates those *.myclient.mydomain.com subdomains (admin, webmail, www.mail) the lets’s encrypt request will fail, then i have to manually install the let’s encrypt certificate, by manually entering the only domain I want, at the time of telling let’s encrypt what domains to issu a certificate for.