0

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>
    ServerName www.domain.com
    ServerAdmin [email protected]
    DocumentRoot /document/root
    ErrorLog /document/root/error_log
    CustomLog /document/root/access_log combined
</VirtualHost>

Any ideas?? Thanks in advance.

2 Answers 2

2

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.

0

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 http://httpd.apache.org/docs/2.0/vhosts/examples.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .