Apache在重启后运行,但不起作用

时间:2012-06-14 09:14:48

标签: apache configuration bind reboot

我在Ubuntu上运行一个Apache,运行得非常好。但是,如果我发出'shutdown -r now'并等到服务器成功启动,则该网站将不会显示在浏览器中。 然后,如果我发出:service apache2 start,它将显示:

[Thu Jun 14 11:08:38 2012] [error] (EAI 2)Name or service not known: Could not resolve host name *.443 -- ignoring!
[Thu Jun 14 11:08:38 2012] [warn] The ScriptAlias directive in /etc/apache2/sites-enabled/default2 at line 18 will probably never match because it overlaps an earlier ScriptAlias.
[Thu Jun 14 11:08:38 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/default2 at line 34 will probably never match because it overlaps an earlier Alias.
[Thu Jun 14 11:08:38 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 * Starting web server apache2                                                      FAIL

但是,当我发出服务apache2停止时,它会显示:

[Thu Jun 14 11:09:34 2012] [error] (EAI 2)Name or service not known: Could not resolve host name *.443 -- ignoring!
[Thu Jun 14 11:09:34 2012] [warn] The ScriptAlias directive in /etc/apache2/sites-enabled/default2 at line 18 will probably never match because it overlaps an earlier ScriptAlias.
[Thu Jun 14 11:09:34 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/default2 at line 34 will probably never match because it overlaps an earlier Alias.
[Thu Jun 14 11:09:34 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
 * Stopping web server apache2              OK

然而,之后netstat -tulpn | grep:80仍显示:

tcp6       0      0 :::80                   :::*                    LISTEN      23561/apache2 

无论如何,当我刚刚杀死上面显示的进程时,例如kill -9 23561,我可以使用service apache2 start成功启动apache2并在浏览器中再次查看我的网站。所以,对我来说,看起来,还有另一个apache2运行使用完全不同的配置。顺便说一句,我已经确定我只安装了一个apache2。 你能帮我解决这个问题吗?提前谢谢了!!! : - )

0 个答案:

没有答案