Until a few days ago I was hosting a single domain on my Server. Now I've added a second domain via apache virtual hosts. Both domains are name based and hosted from the same IP.
Now my logs show me that some relative paths are called on the new domains application that obviously belong to the old domain. It seems that all these calls come from searchengine bots and I can still access the two pages without a problem. So there is no real damage done for endusers.
But I'd like to diagnose the problem. I'm a fairly good programmer but I don't know much about administrative tasks. Because of that I'd like to know which steps you would recommend to diagnose the problem and narrow it down?
System:
- Apache 2
- Ubuntu 10.4 64 Bit
- PushionPassenger w. 2 Rails Apps
- DNS are hoster based
I'd like to give the domain names, but I'm not sure if this is ok with SO.
UPDATE with more specific information:
The two domains are: wintersolutions.de ("old") and pollator.com ("new"). According to my log files the google-bot is hitting 500s on the pollator-application when accessing for example /de/knowhow which is a valid relative URL for the wintersolutions.de domain. Another strange phenomena I just discovered is, that if I access the wintersolutions domain via googles cache I get another domainname fitzzle.com which is another domain of mine. This domains DNS also points to my server but there is no application behind it yet.
The only observation I can make until now is, that google seems to favor domains that are in front in the alphabet.
Both vhost-files look the same, except the domainname:
<VirtualHost *:80>
ServerName wintersolutions.de
ServerAlias www.wintersolutions.de
DocumentRoot "/var/www/sites/wintersolutions.de/current/public"
ErrorLog "/var/log/apache2/wintersolutions.de-error_log"
CustomLog "/var/log/apache2/wintersolutions.de-access_log" common
<Directory "/var/www/sites/wintersolutions.de/current/public">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/sites/wintersolutions.de/current/public/assets">
AllowOverride All
</Directory>
<LocationMatch "^/assets/.*$">
Header unset Last-Modified
Header unset ETag
FileETag none
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>
RewriteEngine On
# Remove the www
RewriteCond %{HTTP_HOST} ^www.wintersolutions.de$ [NC]
RewriteRule ^/(.*)$ http://wintersolutions.de/$1 [R=301,L]
</VirtualHost>
Without having seen more of your configuration, I can only make guesses.
My first guess is that the search engines/robots are using the IP address instead of the hostname when requesting the pages. That means that the first VirtualHost in the list will be used by Apache. If you put the new domain as the first one in your list, this will produce the effects you're seeing.
My second guess is that these are attempts to abuse/crack your system's php installation, and that your original site does have some php but the second one doesn't.