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

The only virtual hosts i have are:

<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    # etc...


<VirtualHost xx.xx.xx.xx:80>

DocumentRoot /var/www/vhosts/

<Directory /var/www/vhosts/>
    Options All -MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all

ErrorLog  /var/www/vhosts/
LogLevel debug  
CustomLog /var/www/vhosts/ combined

</VirtualHost> is perfectly reachable, and that's the expected behaviour.

But when i try to get, it resolves to and not to the default configuration.

Is this an Apache rule?

Is there a way to avoid this?

The only way is to set a virtual host with ServerName

share|improve this question
up vote 1 down vote accepted

The documentation explains how the virtual host is chosen. Basically, your host is chosen because it has a specific IP address, whereas the default host uses a wildcard. Either change your block to also use a wildcard, or change your default host to use the specific IP.

share|improve this answer
thanks, really! – apelliciari Mar 18 '13 at 21:44

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.