Does virtualmin prevent you from creating a Virtual server using the hostname

OS type and version Ubuntu Linux 22.04.4
Webmin version 2.105
Usermin version 2.005
Virtualmin version 7.10.0
Theme version 21.09.5
Package updates 2 package updates are available

I don’t intend to do anything with with this.

Ii just would like to know if Virtualmin prevents the creation of this account and if not, i would consider posting a github issue.

I cannot test this on any of my servers because they are set to get SSL and that might of already created the virtual serve in the background.

Don’t test on a live server just incase it breaks something.

thanks as ever

It’s not recommended to pick a hostname that either hosts a website or acts as a mail server.

i know. I even said i was not going to do this in my post.

I want to know if virtualmin does a check and then denies this action.

Been a while since I installed so I don’t know how or why but my default domain shows up in the virtual server list. I thought it was automatic? I guess not?

default domain? I guess you mean hostname :smile:

It can be enabled here so you can have a cert on your hostname. this has a n option to make the virtual server visible or hidden.

Virtualmin --> System Settings --> Virtualmin Configuration --> Configuration category: SSL Settings --> Create host default domain with Let's Encrypt certificate


I tacked ‘admin’ onto the back of the name of the service I was exploring helping to move from their current provider. (that never happened but I kept the server space for my purposes). There is a virtual server with that domain. If you mean the fully qualified name? I think a sub server would work but you’d have to play with the DNS settings maybe.

I just want to see if there is a check to prevent creation of the virtual server with the hostname, nothing more.

looks like i will have to do a new install somewhere and try. :smile:

Well, if it wasn’t created automatically as the ‘default’, then I created it. So it is possible. Why do you think it should would be an bug to create it? Doesn’t your initial post show it isn’t possible to recreate it?

not a bug to create.

throughout the forum joe has said it is bad to create a virtual server with the same name as the hostname.

So i wanted to know if virtualmin prevented the created of a virtual server with the hostname, if it doesn’t I would then flag this as a bug/feature request.

That’s not quite right.

The problem is virtually hosting mail with the same name as the host you’re hosting the mail virtually on. You then have two things with the same name, which confuses postfix (postfix is being told to rewrite, e.g. to which is a crazy thing to do, so we recommend you don’t do it, and the simplest way to not do that is to not name your system the same as a name you’re hosting in Virtualmin, since Virtualmin defaults to creating a virtual mail domain when you create a virtual server in Virtualmin.

If you want to host one domain you are now required to purchase a second for admin purposes? That’s basically what I did since it was originally supposed to host a few dozen sites.

That said, maybe Virtualmin should create a special default with the hostname that doesn’t use the rewrite rules? Easy enough to say for the person that doesn’t have to write the code. :wink:

I have no idea what you’re saying/asking.

Because the system hostname doesn’t matter. I don’t know why people want it to matter. You do not need to use it for anything.

For example, because you need to have some kind of system in it, or order and logic. All my real server’s is placed in xxx-services.yy domain., real2. … My presentation domain is xxx.yy (from xxx-services.yy) . And my all not routable systems is on real registered xxx-intra.yy domain. And no problem with automatic deploying, fresh instalation and other and it have other benefit’s. And if I read log’s, I know immediately where the problem is. However, this scheme does not contradict your statement, I just want to point out the advantages.

1 Like

Sure, that’s fine. I just mean “you do not need to use it for anything in Virtualmin”. Not that you can’t have a sensible hostname that makes monitoring and alerting comprehensible. My point is that people keep wanting to use it for the same things that are virtually hosted in Virtualmin, which means there are two things with that name, which is a nonsensical thing to do. I think it’s just a conceptual leap that folks aren’t making; what you do in Virtualmin is virtual, it is not the physical host. Mail in Virtualmin is configured in the virtual map in Postfix. Websites configured in VirtualHost sections in Apache configuration. The system hostname is the system itself, and not anything virtually hosted on it.

1 Like

Of course. I didn’t even argue this. It is as you claim.

1 Like

TL;DR currently you can manually create a virtual server using the hostname.

I have flagged this an issue on github.

our internal Nagios monitoring service does simple health checks on our many Linux servers — one crude check it does, using the RedHat server name, is to see if port 80 and 443 are responding (to check to see if apache/httpd is running). My older approach to support that was – create a Virtual Server using the Linux host name :slight_smile:

I hope I can still do this going forward.

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