文件不存在C:/wamp/www/favicon.ico在Apache中的error_log [英] file does not exist c:/wamp/www/favicon.ico in apache error_log

查看:445
本文介绍了文件不存在C:/wamp/www/favicon.ico在Apache中的error_log的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有始终显示日志:文件不存在C:/wamp/www/favicon.ico在Apache的error_log中。我用wampserver,为什么?

There are always the log showing: file does not exist c:/wamp/www/favicon.ico in apache error_log. I used wampserver, why?

推荐答案

这是因为(几乎所有)浏览器在默认情况下一个图标搜索。如果访问的页面不通知的有效网址吧,Apache使用的根目录。

This happens because (almost every) browser searches for a favicon by default. If the accessed page don't inform a valid URL for it, Apache uses the root directory.

您有两种选择。您可以为每个网站的网站图标,或者你告诉阿帕奇不记录该事件作为一个错误消息。

You have two choices. You can create a website icon for each of your websites, or you tell Apache not to log that event as an error message.

如果您选择第二个选项,添加以下code到每个虚拟主机,或者至少不具有一个图标文件中的:

If you choose the second option, add the following code to each VirtualHost, or at least the ones which don’t have a favicon file:

Redirect 404 /favicon.ico
<Location /favicon.ico>
   ErrorDocument 404 "No favicon"
</Location>

或者,你创建了Apache的根目录名称的favicon.ico的空文件(用于为例的/ var / www /,脚本却没有图标将被浏览器为您的网站显示)。

Or, you create an empty file with the name "favicon.ico" in the directory root of Apache (for exemple /var/www/ , but no favicon will be shown by the browsers for your site).

这篇关于文件不存在C:/wamp/www/favicon.ico在Apache中的error_log的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆