我正在管理一个有数百个网站的专用服务器,其中有一个Apache的主日志。
服务器每4或5小时使用一次Apache,我在Apache行中发现如下所示:
128.223.8.111 - [15/Jul/2015:02:36:09 +0100] "HEAD / HTTP/1.1" 159855ms 400 - "-" "-"
160.36.57.172 - [15/Jul/2015:02:57:21 +0100] "HEAD / HTTP/1.1" 105350ms 400 - "-" "-"
142.103.2.2 - [15/Jul/2015:03:45:29 +0100] "HEAD / HTTP/1.1" 130384ms 400 - "-" "-"它们对应于error_logs中的这些
[Wed Jul 15 02:36:09 2015] [error] [client 128.223.8.111] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /
[Wed Jul 15 02:57:21 2015] [error] [client 160.36.57.172] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /
[Wed Jul 15 03:45:29 2015] [error] [client 142.103.2.2] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /现在我想找出他们是如何发生的。从错误日志中,我了解到有人试图在不选择主机名的情况下访问服务器,但我不明白这是怎么可能的。
在同一行中,105~159秒是很多,但我不确定这些表示什么,因为它没有访问任何php文件,因此不需要执行时间,所以我如何限制这些。
任何关于如何找到原因的建议都将不胜感激。
发布于 2015-07-15 09:57:58
这很简单,有人访问http://ip.add.re.ss。它检索没有主机名的页面。
您可以在Apache中创建一个默认的虚拟主机,将404返回给访问者,以尽量减少这些请求的影响。
https://serverfault.com/questions/705865
复制相似问题