Я только что запускал обновление aptitude на своем сервере debian через webmin, когда установка не удалась. Теперь мой сервер Apache2 не работает должным образом, так как он не распознает директиву namevirtualhost, все домены, размещенные на сервере, перенаправляются на сервер по умолчанию. К счастью, другие сервисы, такие как Postfix и Dovecot, в порядке.
Что мне делать, чтобы решить эту проблему?
Спасибо, RayQuang
Обновление 1. Единственные ошибки, которые я получаю при перезапуске apache:
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
Судя по всему, это установка Debian или Ubuntu. редактировать /etc/apache2/ports.conf
и замените:
NameVirtualHost *:80
с участием
NameVirtualHost 192.168.1.100:80
Затем перезагрузите Apache. Вы также можете использовать apache2ctl -S
чтобы проверить правильность настройки ваших хостов.
Обратите внимание, что OpenSuSE использует listen.conf вместо ports.conf, но то же решение работает.