1

我在 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

但是,当我发出 service apache2 stop 时,它会显示:

[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 安装。你能帮我解决这个问题吗?提前谢谢了!!!:-)

4

0 回答 0