About the new _hostname

SYSTEM INFORMATION
OS type and version AlmaLinux 9.7
Webmin version 2.621
Usermin version 2.521
Virtualmin version 8.0.0 GPL
Theme version 26.22
Apache version 2.4.62
Package updates All installed packages are up to date

I know it’s probably not recommended but, with the ability to add phpMyAdmin as a “universal” tool for all, is there a way to add either web apps or even virtual servers under the new _hostname user that I see was created for the main hostname?

No. Don’t use the _hostname domain for anything. If you must have a Virtual Server for the hostname that you want to use for stuff, delete the automatically generated one and create a proper Virtual Server (with mail disabled because it can’t work properly without a lot of hoop jumping).

But, don’t do that! You’re not supposed to use your system hostname for anything. You can use any name you want other than the system hostname. There are infinite possible names. Use any one of those for your “universal” domain, if you need one. The system hostname is the system hostname, and that’s it. The _hostname Virtual Server is created for the purpose of getting a Let’s Encrypt certificate before any domains exist. Once you’ve got other domains, you can forget about it (delete it, whatever).

1 Like

I thought @Ilia added code to prevent the use of the system hostname for a normal virtual server, or did you guys decide against it in the end.

We added code to prevent creating a virtual server with a hostname that matches with the mail feature is enabled. This is still not allowed by default.

When setting up a global phpMyAdmin installation for all servers to use, I would probably use phpmyadmin.domain.tld or pma.domain.tld as a separate virtual server. Of course, you can also host it under an automatically created domain, but keep in mind that if you change your hostname, the link to phpMyAdmin will change too.

thanks for the clarification

Not sure what you mean here?

I would prefer phpmyadmin not to be publicly available, maybe I can do something with proxying?

_hostname is this something new in Virtualmin 8?

My setup

  • System Hostname = server.example.com
  • Main Website = example.com / www.example.com
  • Apps =
    • www.example.com/randomdirectory/ this is protected by a htacccess restricting to local IP address only
    • www.example.com/randomdirectory/phpmyadmin
    • www.example.com/randomdirectory/roundcube

Yes in Virtualmin 8, during setup for a new install, _hostname is created an automatic page in the site. It generally hosts a default landing page for the hostname and that’s it.

If you upgraded from Virtualmin 7 to 8, I believe it’s not made for you.

It is not new to Virtualmin 8. It was added maybe a year ago. But, it only happens if your hostname resolves at install time.

As I said, it is so Virtualmin can get a certificate for Webmin so you won’t get browser errors during your first login before you have any Virtual Servers that can get a cert. Now that Let’s Encrypt allows issuing IP-based certificates, that’s probably not necessary, anymore. And, because it confuses so many people, I tend to think we’d rather not have it. I dunno.

1 Like

Ahh I forgot I had a mispelling in my hostname when I originally installed.

Can IP address certs be created in Virtualmin? Last time I tried I got an error saying IP certs weren’t possible. (Even though I’m certain it was at that time.)

No. And, I generally recommend against it.

But, for the install time cert, it might make sense for systems that don’t have working resolution for the hostname. But, I guess it would still require a Virtual Server for the IP, so that doesn’t really solve the problems caused by the _hostname Virtual Server, it would just have an IP instead of the hostname, which might confuse people even more. But, browsers are really annoying about self-signed certs these days.

1 Like