请教一个关于apache的错误日志的问题

2012-10-24 23:15:26 +08:00
 nonozone
最近查看服务器上的apache的错误日志,发现有这么一堆

[Wed Oct 24 21:08:44 2012] [error] [client 124.115.1.7] File does not exist: /var/www/detail
1846 [Wed Oct 24 21:18:23 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1847 [Wed Oct 24 21:18:23 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1848 [Wed Oct 24 21:18:23 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1849 [Wed Oct 24 21:18:23 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1850 [Wed Oct 24 21:18:23 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1851 [Wed Oct 24 21:28:07 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1852 [Wed Oct 24 21:31:59 2012] [error] [client 199.30.59.172] File does not exist: /var/www/robots.txt
1853 [Wed Oct 24 21:46:35 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1854 [Wed Oct 24 21:46:36 2012] [error] [client 31.210.123.132] File does not exist: /var/www/products
1855 [Wed Oct 24 22:14:20 2012] [error] [client 31.210.123.132] File does not exist: /var/www/robots.txt
1856 [Wed Oct 24 22:14:21 2012] [error] [client 31.210.119.210] File does not exist: /var/www/robots.txt
1857 [Wed Oct 24 22:51:39 2012] [error] [client 180.76.5.183] File does not exist: /var/www/robots.txt
1858 [Wed Oct 24 23:11:08 2012] [error] [client 157.55.35.79] File does not exist: /var/www/robots.txt


首先,/var/www这里现在是没有任何网站的,但是这个地址可以访问,里面有个index.php我自己做测试的,网站并没有放在这个目录,但是错误日志出现这么多内容,这一半是怎么造成的呢?
2143 次点击
所在节点    问与答
1 条回复
TONYHEAD
2012-10-25 10:00:34 +08:00
在/var/www下建立一个robots.txt

搜索引擎会默认爬robots.txt,如果找不到,日志里面就会出现404错误。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/50821

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX