Best practices for choosing the system hostname during setup

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Webmin version 2.105

Hi @Joe @forlotto

After installing Virtualmin, I followed the configuration steps, and the default system hostname came up as my naked domain e.g. mydomain.com.

Should I keep it like that or should the system hostname rather be something like host.mydomain.com?

How does this work between Webmin and Virtualmin and can this create any conflicts?

The final setup will be to redirect www.mydomain.com to mydomain.com which will be pointing to port 8080.

Thanks

I believe that below you will find the answers objectively.

1 Like

For your virtualmin server hostname you must use the format host.mydomain.com

  • rDNS will fail if you use mydomain.com
  • Your virtualmin is a server and is part of the domain, it is not the domain itself.

The website for mydomain.com is setup in virtualmin as a virtual server and is different to your server hostname.

When you configure stuff in Virtualmin, it configures the services directly and so in a sense configures Webmin aswell, so you dont need to worry about this.

Redirects can be done in htaccess files or in virtualmin
Virtualmin → Web Configuration → Website Redirects

The port I will leave to you as I dont know how to do that.

1 Like

Thanks @shoulders

Should host.mydomain.com have an IP address pointing to the server? If so, should then rather login to the server via host.mydomain.com:10000 or should I use mydomain.com:10000?

This is covered by the docs. From the download page:

“If your system does not have a fully qualified hostname, the script will ask you to provide one. The name of the system can be anything you want, but it must be fully qualified and should not match a name you’ll be hosting mail for. For example, if you have domain virtualmin.com you might name the server srv1.virtualmin.com or ns1.virtualmin.com. What name you choose is unimportant, but it must be fully qualified, it must not match a domain you’ll be managing in Virtualmin, and it must resolve, for several mail operations to work correctly.”

Or the longer install docs:

“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 “srv1.virtualmin.com”, or simply “virtualmin.com” (but do not use a name you’ll be hosting in Virtualmin). 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.”

I don’t know how we can make that more clear?

You should not name your server the same name as something you’ll be hosting in Virtualmin. It can be literally any other fully qualified domain name.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.