Several domains under the same IP : without www, virtualmin loads the WRONG website ??

2 posts / 0 new
Last post
#1 Wed, 09/03/2014 - 12:36
EcchiOli

Several domains under the same IP : without www, virtualmin loads the WRONG website ??

Hello !

I find myself in a pinch, I tried, and tried, and tried, but I can't understand why virtualmin is causing me an issue. Could I humbly ask for help, please ?

Some of my websites have a "www" problem. If I don't manually add "www." in the beginning of their hyperlink, what will be loaded, in the browser of the visitors, will be the /public_html/index.html file of ANOTHER DOMAIN hosted on my server and also managed by virtualmin.

Several domains are affected. I really, really, fail to comprehend, despite extensive testing, google searching and documentaiton browsing. Can you imagine the issue ? A visitor types the URL of a website, is too lazy to type the initial www. , and, BAM, he is shown another domain of my server ?!? O_o

(And, to make it worse, the website that is loaded by default is one of my friend's adult fetish pictures places, thank you so much for the randomness ¬_¬)

Please, would you know what may cause this ? If you can help, I'll be really grateful !

*

More details follow :

Besides my server's own "public for the internet" IPv4 adress, I own 3 other IPv4 IPs, my virtualmin dedicated server (debian wheezy, virtualmin stable) knows them all, with websites working and running on each of them, sometimes only one website per IP, sometimes 2 or 3 websites per IP.

To add a domain, in virtualmin, I click "Create Virtual Server" (virtual-server/domain_form.cgi?generic=1) and then (I think) I tick always the same kind of options. Meaning every site is a different domain, and has its own username. I only once gave a site the server's default IP, every other site has one of my three other additional IPs.

And one of the sites' files ( /public_html/index.html ) is the default thing to show to some of the domains when they are accessed without "www" in their URL.

For the domains with the problem, I checked the tickbox in Server Configuration > Website Options > "Website matches all sub-domains?" : Yes ... to zero change.

And yet, surprisingly, some of my websites do NOT have this problem, I can open them without www in the beginning without problem.

I checked https://www.virtualmin.com/documentation/web/troubleshooting And : . there is no asterisk (*) for any VirtualHost in /etc/apache2/sites-enabled/ . System Settings -> Virtualmin Config -> Network Settings are almost default (eth0 is manually setup as to be used)

I compared the various domain.conf domains in /etc/apache2/sites-enabled/ however, to be frank, there were too many minor differences between the files for me to reach a conclusion.

*

Even more information follows, in the form of screenshots

*

... And that's as far as I could go with my knowledge.

Please, would someone have an idea, would know what might be wrong ? Thank you SO MUCH if you can help !

Tue, 09/09/2014 - 18:34
EcchiOli

Hello again.

Finally, found the origin of the problem, one year ago, I edited my hosts file on my own computer, to see the new IPs of my server even before DNS propagation took place.

And then, I totally forgot about it.

The result was a huge conflict for IP resolving, which led to this weird issue. Cleaning hosts file, flushing DNS caches in browsers, fixed it -_-

Sorry for the hassle, hoping nobody sweated on this post -_-

Topic locked