Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I upgraded from apache 2.0 to apache 2.2, and now all my virtual hosts are ignored. I'm running a debian server, and I completely upgraded to the new apache2 config file.

in sites-enabled i have all my links to sites-available, which worked perfectly fine before!

When I start the server I get:

Reloading web server config: apache2[Sat Oct 17 16:34:22 2009] [warn] NameVirtualHost *:80 has no VirtualHosts

One of the sites-enabled files:

<VirtualHost *:80>
    DocumentRoot /document/root
    ErrorLog /document/root/error_log
    CustomLog /document/root/access_log combined

Any ideas?? Thanks in advance.

share|improve this question
up vote 2 down vote accepted

Ok I found the problem:

Some of my sites-enabled/* files had only:

<VirtualHost *>

Without the port number... This caused all the other sites to stop working.

share|improve this answer

You should have added the

NameVirtualHost *:80

Directive above the virtualhost where you declared it - this would have allowed all your configs to work as expected.

The documentation is reasonably clear for this

share|improve this answer

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.