Apache中 File does not exist: /var/www/html/favicon.ico

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apache中 File does not exist: /var/www/html/favicon.ico相关的知识,希望对你有一定的参考价值。

今天搭建lamp架构的电子商务网站,突然间发现/var/log/httpd/errorlog报错了
[Sat Jul 12 09:14:53 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul12 09:25:19 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul 12 09:25:38 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul 12 09:25:50 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul 12 09:25:53 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul 12 09:25:58 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
[Sat Jul12 09:26:01 2012] [error] [client 192.168.1.152] File does not exist: /var/www/html/favicon.ico
去/var/www/html/目录下看了下,确实没有这个文件。那么这个文件到底是干什么用的呢?
查找了一下资料
favicon.ico就是指你的网站图标。 当有人(使用IE浏览器)将你的网站收藏为“my favorite”时,就会去参照网站根目录下的“favicon.ico”文件,这个图标也就是“my favorite”里显示的图标。 
比如你将“http://www.debian.org/”列为“my favorite”的时候,
你的“my favorite”清单就会显示“http://www.debian.org/favicon.ico”这个图标。 
当 你的根目录下没有“favicon.ico”这个文件时,“my favorite”里将显示IE浏览器的图标例如:技术分享

,与此同时“favicon.ico”不存在的信息(404 not found)会写到你的apache2错误日志中去,这样你可以从这个日志中看出,什么时候,什么人(其IP网址)将你的网站设定为“my favorite”。
解决方法可以随便找个favicon.ico放到该目录下,或者在线生成一个。
cp /usr/src/httpd-2.2.23/docs/manual/images/favicon.ico  /var/www/html/
然后就不报错了。

以上是关于Apache中 File does not exist: /var/www/html/favicon.ico的主要内容,如果未能解决你的问题,请参考以下文章

错误代码: 1449 The user specified as a definer ('root'@'%') does not exi

org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/input(

LVS负载均衡到后端apache的虚拟主机报404错误 检查日志发现:File does not exist: /etc/httpd/htdocs

According to TLD or attribute directive in tag file, attribute value does not accept any expressions

Document base xxx does not exist or is not a readable direct

Installation Directory does not contain Apache HTTP Server configuration