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.
- For instance, a domain for which there is a www problem : http://pastebin.com/FgBx6KAb
- Another domain with the www problem : http://pastebin.com/LMuHEpF8
- While, a domain for which there is not the www problem : http://pastebin.com/5RuQ5i9b
- … Me, frankly, I don’t see anything definitely conclusive
Even more information follows, in the form of screenshots
- the full list of IPs and domains on this server, with or without problems, maybe a pattern may come out :
http://www.paumadou.com/misc/virtualmin0.jpg - The network-related virtualmin configuration, all seems OK, apparently :
http://www.paumadou.com/misc/virtualmin1.jpg - Making sure configuration is OK, and it was :
http://www.paumadou.com/misc/virtualmin2.jpg - Validating the domains, and all was fine :
http://www.paumadou.com/misc/virtualmin3.jpg
… 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 !