issue: misoncifgured dns?
symptom: when i visit http://www.borisnikolaev.com/index.php?option=com_content&view=article&id=51&Itemid=53
, it shows what should be on http://www.floridaseating.com/index.php?option=com_content&view=article&id=51&Itemid=53
if i remove the 'www' subdomain, it works as usual.
this occurs for several of the other domains on this server, and when using any subdomain, except those in the dns zone file (excluding www).
the reason i noticed this is because google had indexed several of the pages under the wrong domain name.
primary domain dns configuration: http://i.imgur.com/ITx4F.png
secondary domain dns configuration: http://i.imgur.com/vknWN.png
any help is appreciated!
i have a dv server with mediatmeple, which has apache 2.2, and plesk 10.4. i have switched off the dns management in plesk, as i don't resell hosting, and manage that through mediatemple's account center page.
FOUND SOLUTION, thanks to direction by @cjc
Following should work. Add to vhost.conf
file typically found in /var/www/vhosts/domain.com/conf
ServerAlias *.domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteCond /var/www/vhosts/domain.com/httpdocs/%1 -d
RewriteRule ^(.*) /%1/$1 [L]
So:
I assume you mean to serve www.borisnikolaev.com and borisnikolaev.com from the same web server, given the DNS.
In that case, your Apache virthosts aren't configured to respond properly to the www versions of the server names, and are hitting the configuration for www.floridaseating.com by default.
In the virthost config for borisnikolaev.com, use the ServerAlias directive and add a line like: