This question already has an answer here:
I've discovered (via looking at mod_pagespeed cache entries) that a completely random domain I've never heard of before is resolving to my website.
If I visit this domain, my website loads. The DNS for that domain is pointing to my server's IP.
Right now in my vhost config I have *:80, which I'm guessing is where I'm going wrong.
I immediately changed this to example.com:80 where example.com is my domain. Assuming this would mean the server would only respond to and fulfil requests for my domain name, rather than any request on port 80.
My original vhost config;
<VirtualHost *:80> DocumentRoot "/var/www/example.com" <Directory "/var/www/example.com"> Order allow,deny Allow from all Allowoverride all </Directory> </VirtualHost>
My new tried config;
Listen 80 ServerName example.com <VirtualHost example.com:80> DocumentRoot "/var/www/example.com" <Directory "/var/www/example.com"> Order allow,deny Allow from all Allowoverride all </Directory> </VirtualHost>
When I tried to restart apache with the new config I got the following error:
* Restarting web server apache2 [Fri Mar 28 08:55:47.821904 2014] [core:error] [pid 5555] (EAI 2)Name or service not known: AH00549: Failed to resolve server name for 18.104.22.168 (check DNS) -- or specify an explicit ServerName (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Note: The IP beginning 152 in the above error has been slightly edited, but the original wasn't my server's IP address anyway.
Can anyone offer advice on this issue? Is the domain (actually there's a couple) that is resolving to my website innocently just the previous user of the dedicated server, whose DNS is just still pointing to it? How can I resolve the apache virtual host config issue, and any other advice is welcome.