Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


  • 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: ("old") and ("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 domain. Another strange phenomena I just discovered is, that if I access the wintersolutions domain via googles cache I get another domainname 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>
    DocumentRoot "/var/www/sites/"
    ErrorLog "/var/log/apache2/"
    CustomLog "/var/log/apache2/" common
    <Directory "/var/www/sites/">
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
    <Directory "/var/www/sites/">
    AllowOverride All
    <LocationMatch "^/assets/.*$">
        Header unset Last-Modified
    Header unset ETag
    FileETag none
    ExpiresActive On
    ExpiresDefault "access plus 1 year"
    RewriteEngine On
    # Remove the www
    RewriteCond %{HTTP_HOST} ^$ [NC]
    RewriteRule ^/(.*)$$1 [R=301,L]
share|improve this question
I think it's more of a question whether it's OK with you. Tell us a bit more about your vhost config (remove any sensitive information and post it here, preferably), and maybe some more about these relative paths that are requested by bots. – Mathias R. Jessen Jul 15 '12 at 10:43
up vote 2 down vote accepted

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.

share|improve this answer
The first part sounds like a good explaination but would also mean I could do nothing about it, right? Second part is impossible because I looked the bots up and they are legit google spiders. I've seen bots looking for security holes in the past, luckily enough I'm not using PHP. – wintersolutions Jul 15 '12 at 11:54
The thing you could do about it is to move the two virtualhosts around, so the old one is the first one in the file. That will make it the default one, so it'll be the one used by the spiders. – Jenny D Jul 15 '12 at 15:22
They reside in different files + I couldn't make my mind up which has to go first ;) – wintersolutions Jul 15 '12 at 19:46
Then the order in which you include the files is the order in which they're parsed, so whatever file you mention first is the one that will be your default. – Jenny D Jul 16 '12 at 4:03
Thanks Jenny, Ill think about the order and rename my files accordingly – wintersolutions Jul 16 '12 at 7:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.