Apache 意外关闭
我有一个混合服务器在 Apache 后面运行。 效果很好; 然而,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 是什么,但我认为我的应用程序中没有任何内容调用它。 另外,网站仍处于 Beta 模式,用户很少,我认为没有人拥有 61.139.105.163 IP 地址,但他们可能拥有它。
有任何想法吗? 如果您能给我提示在哪里查看或如何分析这个问题,那就太好了
I have a mongrel server running behind Apache. It works fine; however, every now and then the Apache server shuts downs seemingly by itself. I'm not sure if there is configuration issue or if it's an attack. Here is Apache error log:
[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
Not quite sure what is /var/www/fastenv but I don't think there is anything in my application that calls that. Also, website is still in Beta mode with few users and I don't think any have 61.139.105.163 IP address but it's possible that they might have it.
Any ideas? It would be good if you can give me hints where to look or how to go about anaysing this problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我有来自同一 IP 的完全相同的日志。 查了一下,发现它属于中国政府。 这似乎是使用服务器端包含的扫描,以尽可能多地查找有关您的服务器的信息。 我封禁IP了
I have the exact same log from the same IP. Looking it up shows it to belong to the Chinese government. It appears to be a scan using server side includes to find out as much as they can about your server. I banned the IP.
不确定这完全与编程相关,但无论如何......对我来说,这些都不像严重错误。 对
/var/www/fastenv
的访问仅意味着 IP 地址为 61.139.105.163 的计算机发送了对http://www.example.com/fastenv
的请求或类似的东西(这取决于您如何配置虚拟主机); 我会查看访问日志以获取更多信息,以查看来自该 IP 地址的其他请求。 这可能没什么好担心的。关于
NameVirtualHost *:0
的行意味着您的配置文件中的某个位置有不正确的NameVirtualHost
指令,可能没有参数。 您可能应该查找并删除它,但如果服务器无论如何都运行良好,那么这没什么大不了的。你的服务器终止(实际上是重新启动)的原因似乎是 SIGHUP - 也就是说,系统上的某些东西正在向 Apache 发送一个信号,告诉它重新启动。 我认为,如果您运行 apache2 restart ,发生的情况基本上是相同的。 在不知道是什么发送了该信号的情况下,我无话可说。
Not sure this is entirely programming-related, but anyway... none of those look like serious errors to me. The accesses to
/var/www/fastenv
just mean that the computer at IP address 61.139.105.163 sent a request forhttp://www.example.com/fastenv
or something like that (it depends on exactly how you've configured your virtual hosts); I'd look at the access log for more information, to see what other requests have been coming from that IP address. It's probably not anything to worry about.The line about
NameVirtualHost *:0
means that somewhere in your configuration file you have an incorrectNameVirtualHost
directive, maybe with no arguments. You should probably look for that and remove it, but if the server is running fine anyway, it's not a big deal.The reason your server is terminating (restarting, actually) appears to be a SIGHUP - that is, something on the system is sending Apache a signal telling it to restart. It's basically the same thing that happens if you run
apache2 restart
, I think. Without knowing what's sending that signal, there's not more I can say.61.139.105.163 因执行各种黑客行为而闻名,只需 google 一下 IP 地址即可。 您应该明确禁止该 IP 地址。
61.139.105.163 is known for doing all kinds of hacking type things, just google the IP address. You should definitly ban this IP address.
点击Apache配置--> Apache(httpd.conf)
搜索 #Listen 12.34.56.78:80 并将其替换为 #Listen 12.34.56.78:8081。
搜索Listen 80并将其替换为Listen 8081。
现在您可以启动 Apache,并可以使用以下 URL 运行它:
localhost:8081/xampp/
Click on Apache Config --> Apache(httpd.conf)
Search for #Listen 12.34.56.78:80 and replace it with #Listen 12.34.56.78:8081.
Search for Listen 80 and replace it with Listen 8081.
Now you can start Apache now, and can run it with this URL:
localhost:8081/xampp/