`
xiaojiit
  • 浏览: 129470 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

apache 关闭 favicon.ico 不存在时的error_log

阅读更多

当网站根目录中没有 favicon.ico文件时,

Apache会记录 File does not exist: /opt/apache2/htdocs/favicon.ico的错误日志到error_log中,

通过以下方式进行解决:

 

1.在apache配置文件中添加以下配置

# Don't bother looking for favicon.ico
Redirect 404 /favicon.ico
# Don't bother sending the custom error page for favicon.ico
<Location /favicon.ico>
ErrorDocument 404 "No favicon"
</Location>

 

 2.在网站目录中添加favicon.ico,让其变的存在。

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics