0

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
2
  • Can you post the error relevant messages from your logs?
    – Khaled
    Feb 10, 2011 at 12:49
  • Do you really have a NameVirtualHost directive somewhere in the configuration?
    – coredump
    Feb 10, 2011 at 13:23

2 Answers 2

2

By the looks of things that's a Debian or Ubuntu install. Edit /etc/apache2/ports.conf and replace:

NameVirtualHost *:80

with

NameVirtualHost 192.168.1.100:80

Then reload Apache. You can also use apache2ctl -S to check that your vhosts are setup correctly.

1

Note that OpenSuSE uses listen.conf instead of ports.conf, but the same solution works.

You must log in to answer this question.

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