This is a frequently asked question. If someone else is presently facing this challenge. To facilitate future configurations, and to reduce risks of future challenges, it is suggested to use different names for the hostname and the Virtualmin Virtual Server.
Suggested naming format
- Hostname:
host.domain.tld
- Virtualmin Virtual Server:
domain.tld
Assumptions
- Assumes the hostname is a Fully Qualify Domain Name (FQDN)
- Assumes by
host.domain.tld
we mean for example this:ns1.yourdomainname.ca
- Assumes by
domain.tld
we mean for example this:yourdomainname.ca
- Assumes by “future challenges” we mean that if the hostname and Virtual Server both use the same name, this is risky to result in challenges, such as, but not limited to, handling of incoming email messages.
Related documentation
Fully qualified domain name
If your system does not have a fully qualified domain name (FQDN), the installer will stop and ask you to choose one. This is mandatory because many services rely on having a fully qualified domain name in order to function. Mail, in particular, but some Apache configurations and many of the Virtualmin-created configuration files, also require a valid fully qualified domain name to function correctly. A fully qualified domain name is one of the form “www.virtualmin.com”, or simply “virtualmin.com”. We recommend you choose a name that is not one for which you will be receiving mail, in order to simplify later configuration. A good choice is to use a name server designator, such as “ns1.virtualmin.com”. Some customers also choose something like “host1.virtualmin.com” or “primary.virtualmin.com”. Any of these would be valid and would satisfy the install script and the services that rely on this option. The install script will add this name to /etc/hosts, which will satisfy all local services. It is even better if this name resolves correctly when looked up from outside of the system–this requires the name be added to your DNS zone for the second level domain. If the Virtualmin server you are installing will be the authoritative name server for this zone, you can later use Webmin to add a record for this name to the zone.
Source Automated Virtualmin Installation – Virtualmin
Thanks to andreychek’s related comment at hostname and virtualserver cant be the same? - #2 by Eric