Apache意外关闭

时间:2009-05-02 01:05:59

标签: ruby-on-rails apache apache2 shutdown spam-prevention

我有一个在Apache后面运行的mongrel服务器。它工作正常;然而,Apache服务器偶尔会自行关闭。我不确定是否存在配置问题或是否是攻击。这是Apache错误日志:

[Thu Apr 30 02:15:07 2009] [notice] SIGHUP received.  Attempting to restart
[Thu Apr 30 02:15:07 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Apr 30 02:15:07 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Thu Apr 30 02:17:13 2009] [error] [client 61.139.105.163] File does not exist: /var/www/fastenv
[Thu Apr 30 02:24:06 2009] [error] [client 61.139.105.163] File does not exist: /var/www/fastenv
[Thu Apr 30 10:49:18 2009] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Apr 30 10:49:18 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Thu Apr 30 12:53:08 2009] [notice] SIGHUP received.  Attempting to restart
[Thu Apr 30 12:53:08 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Apr 30 12:53:08 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Thu Apr 30 12:59:15 2009] [notice] SIGHUP received.  Attempting to restart
[Thu Apr 30 12:59:15 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Apr 30 12:59:15 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Thu Apr 30 13:58:49 2009] [notice] SIGHUP received.  Attempting to restart
[Thu Apr 30 13:58:49 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Apr 30 13:58:49 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Fri May 01 10:59:07 2009] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri May 01 10:59:07 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Fri May 01 17:51:15 2009] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri May 01 17:51:15 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations

不太确定/ var / www / fastenv是什么,但我认为我的应用程序中没有任何东西可以调用它。此外,网站仍处于测试模式,用户很少,我认为没有任何人拥有61.139.105.163 IP地址,但他们可能拥有它。

有什么想法吗?如果你能给我提示在哪里寻找或如何解决这个问题,那将是件好事

4 个答案:

答案 0 :(得分:1)

不确定这完全与编程相关,但无论如何......对我来说,这些都不是严重的错误。对/var/www/fastenv的访问只是意味着IP地址为61.139.105.163的计算机发送了http://www.example.com/fastenv或类似的请求(这取决于您如何配置虚拟主机);我将查看访问日志以获取更多信息,以查看来自该IP地址的其他请求。可能没有什么可担心的。

关于NameVirtualHost *:0的行意味着配置文件中的某个地方有一个不正确的NameVirtualHost指令,可能没有参数。你可能应该寻找并删除它,但如果服务器运行正常,那不是什么大问题。

您的服务器终止(实际上重新启动)的原因似乎是SIGHUP - 也就是说,系统上的某些东西正在向Apache发送一个信号,告诉它重新启动。我认为,如果你运行apache2 restart,基本上会发生同样的事情。在不知道发送信号的是什么的情况下,我不能说更多。

答案 1 :(得分:1)

我有来自同一IP的完全相同的日志。抬头看来它属于中国政府。它似乎是使用服务器端包含的扫描,以尽可能多地了解您的服务器。我禁止了IP。

答案 2 :(得分:0)

61.139.105.163以做各种黑客类型的东西而闻名,只需google的IP地址。你应该明确禁止这个IP地址。

答案 3 :(得分:0)

点击Apache Config - >阿帕奇(httpd.conf)中

搜索 #Listen 12.34.56.78:80 并将其替换为 #Listen 12.34.56.78:8081

搜索 Listen 80 并将其替换为 Listen 8081

现在您可以立即启动Apache,并可以使用以下URL运行它:localhost:8081/xampp/