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

Requests to my domain are served from the default page (/var/www/default), and not from /var/www/leanback_eu. How is this possible? Other vhosts are working fine. The hostname of my machine is


NameVirtualHost *:80
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/default/
        <Directory /var/www/default/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

        ErrorLog /var/log/apache2/error_default.log

        # debug, info, notice, warn, error, crit, alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access_default.log combined


<VirtualHost *:80>
    DocumentRoot "/var/www/leanback_eu/"
    ErrorLog "/var/log/apache2/error_leanback_eu.log"
    CustomLog /var/log/apache2/access_leanback_eu.log combined

    <Directory "/var/www/leanback_eu/">
        Order allow,deny
        Allow from all
        AllowOverride All
<Directory /var/www/leanback_eu/stats>
                Options Indexes
                AllowOverride None
                Order allow,deny
                allow from all

$ sudo apache2 -S

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
default server (/etc/apache2/sites-enabled/000-default:2)
port 80 namevhost (/etc/apache2/sites-enabled/000-default:2)
port 80 namevhost (/etc/apache2/sites-enabled/kexx_net:77)
port 80 namevhost (/etc/apache2/sites-enabled/leanback_eu:1)

It might be zomething very simple...

share|improve this question
up vote 1 down vote accepted

Your first virtual host container not having a ServerName directive is causing it to be a catch all. Add a name for that (whatever default you want), but change the enclosure to read <VirtualHost _default_:80> instead of *:80 and you should be good to go. It will still be the default, but now the others will match too instead of getting stuck on the match all host that didn't have a name.

share|improve this answer
I added ServerName as I have currently set up all my domains nicely. It seems to work fine now. Is this a good way to go? – Karlo Apr 16 '11 at 10:36
I would recommend using a real valid name, like or whatever your reverse dns entry works out to. – Caleb Apr 16 '11 at 10:39
Thanks for all your quick replies, this worked for me! – Karlo Apr 16 '11 at 10:42

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.