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,让其变的存在。
页:
[1]