Randomly showing wrong virtual server


For a couple of years I’m successfully using Virtualmin on my VPS, hosting several domains/virtual servers on the same IP. Recently I created a new virtual server for a new domain, let’s say xxx.net. The DNS A record is pointing to the correct IP address.

Something is not working correctly. When going to this new domain in the browser, http://xxx.net, it either shows the correct content or the default website for the IP address. This seems to be random. I’ve refreshed the page a hundred times (empty cache, hard reload etc), but cannot figure out what’s happening. Any ideas what could be wrong?



If your other Apache virtual hosts are configured to listen on *, rather than an IP address, then newly created domain should do too. Check and fix Apache config accordingly and later adjust defaults in Virtualmin configuration.

Thanks for your reaction, I’m still not be able to fix my problem.

I followed https://www.virtualmin.com/documentation/web/troubleshooting and everything seems correct. No *, but real IP addresses for all sites-enabled configs. All error_logs are empty.

I cloned a correctly working virtual server in the hope this would solve things, but it resulted in the same problem. So it’s still randomly showing the default website or the correct website of the new domain. If the correct website is showing, half of the assets are nog loaded (because of ‘net::ERR_ABORTED 404 (Not Found)’ errors). Does this give any clues?

Compared to the previous virtual hosts that were set up without problems, the only difference I can think of is that an SSL certificate was installed for one of the domains in the meantime. I do also notice that the new domain, https://xxx.net, redirects to this SSL-enabled domain, even though this does not happen for the existing virtual servers.

I would be very grateful if you have other ideas to solve my problem.

Edit: also, when I change the domain name of a correctly working virtual server to my new domain name, this results in the same random problems. When I change it back to its original domain name, that domain works perfectly again…

Hi, if your using letsencrypt then this may help - I use certbot to install ad remove the SSL cert but one time I removed a site with virtualmin without first removing the certificate with certbot - every thing continued to work fine until Apache got rebooted some weeks later. Then everything pointed to the default site - in the end I decided to restore and it still failed, even a week old restore failed. So in etc/letsencrypt/live there directorys with keys in and when I removed the old site it all worked. That’s all I know, I don’t use the virtualmin method to install SSL - good luck

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