I have just been running aptitude update on my debian server via webmin when the install failed, Now my Apache2 server isn't running properly as it isn't recognizing the "namevirtualhost" directive, all the domains hosted on the server are being redirected to the default server. Luckily the other services like Postfix and Dovecot are fine.
What should I do to fix this problem?
Thanks, RayQuang
Update 1: The only errors that I receive when restarting apache are:
rayquang:~# /etc/init.d/apache2 force-reload
Reloading web server config: apache2[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:0 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:0 overlaps with VirtualHost 192.168.1.100:443, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Feb 10 20:43:22 2011] [warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
By the looks of things that's a Debian or Ubuntu install. Edit
/etc/apache2/ports.conf
and replace:with
Then reload Apache. You can also use
apache2ctl -S
to check that your vhosts are setup correctly.Note that OpenSuSE uses listen.conf instead of ports.conf, but the same solution works.