all domains point to the same site

hi @ all,

i see a very strange behavior of my box for the last few days… every time i create a new virtual- or sub server, all existing servers point to the new one … if i delete the new created server, everything is ok again. if i have a look at the virtualhost list, everything seems to be ok… and another thing is , if i use subservers like : i get allways redirected to

i guess, the second last update ( which nearly crashed my box ) let run me from one problem to the next.

i made a backup of all my virtual server now, and think about, to reinstall virtualmin, maybe this would solve the most problems.

so, i ve a few questions about it.

  • is the uninstall from the working now ?
  • what do i need to do, to uninstall virtualmin and webmin completely, so that i have a clean system again, ready for a new installation ?
  • do i need to backup the existing virtualservers in a special way, to prevent misconfigurations when restore them on the new installation ?

Hey Richard,

I’m sure a reinstall is way more trouble than you need to go through for this simple problem (and it is simple).

This particular problem has been popping up a lot lately…I think there must be something in the default package on some platform that re-adds the “default” VirtualHost. Anyway, there’s a bit of documentation about the problem here in the troubleshooting common problems guide:,troubleshooting_common_problems/#the_wrong_site_shows_up

In short, the NameVirtualHost and VirtualHost directives do not match–or you have a *:80 entry that is sucking up all of the hits before the specific IP-based directives come into play. Fix that, and all will fall into place.

I am having this same issue.

When I went to this thread:,troubleshooting_common_problems/#the_wrong_site_shows_up

I found a description of the problem, and a "quick" solution. Would it be too much to ask for clarification with an example image? Or "Virtual host directives you can get to by clicking [some link]->[the next link]->" and so on…

I know where to find the "Addresses for name virtual servers" and mine is set for the external IP [] (clicked webmin->apache2->Global Configuration tab->networking and addresses). I assume this is the "NameVirtualHost" directive.

Right now in my httpd.conf file - this is how these directives are set:

NameVirtualHost *

(where is our public IP address)

And for each <VirtualHost></VirtualHost> the entries look something like this:

<VirtualHost *>
Redirect /
DocumentRoot /home/oneofourchurchsites/public_html

If I understand this correctly, then in the httpd.config file REMOVE the NameVirtualHost * AND in every single <VirtualHost> entry, change it to look like this:

Redirect /
DocumentRoot /home/oneofourchurchsites/public_html

Is this correct?


If I understand this correctly, then in the httpd.config file REMOVE the NameVirtualHost * AND in every single

Absolutely correct.

You’ve also got a problem in your Virtualmin configuration. It shouldn’t be generating entries like this.

In the Virtualmin Module Configuration (in the System Settings menu), browse to the “Other Server Settings” section, and find the option labeled “Default virtual server IP address” and set it either to the network interface (default) or to an explicit IP. It can’t be * (which is what you have now, I think…if you don’t, let me know, as something is broken in Virtualmin).

You’re right that I should be a bit more explicit about this. I’ll add some more detail to the troubleshooting doc.

Nope, the default IP is set to our only public ip for the virtualmin box. I edit everything manually usually…more of a command line person (read: I broke it), but like gui stuff if it speeds me up (I just don’t always understand how to use it…). Things are working fine now - I can add a site after making these changes and not have the whole apache system of virtual servers choke and fall back to the default site because it’s confused. So it’s not adding the “*” but our IP instead and since all of the virtual hosts are set with the IP now it worketh. Whew.

Thanks for the response and clarity!


Awesome. Thanks for the update.

I’ve added a few more concrete details and pointers to the relevant configuration options to the Troubleshooting documentation.