【问题标题】:Apache - File does not exist error (file is definitely there) - favicon.icoApache - 文件不存在错误(文件肯定存在) - favicon.ico
【发布时间】:2013-07-07 14:35:55
【问题描述】:

我在 Linux 中将 apache 设置为 LAMP 服务器

在根 /www/ 目录中,我有一个 favicon.ico,但它从不显示在浏览器(Chromium、Firefox)和 apache error.log 中,我收到以下错误:

[Mon Jul 08 17:32:30 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

我并不特别担心文件没有出现,但它就在那里,我无法弄清楚为什么它会给我这个错误。

【问题讨论】:

  • “root /www 目录”是否在您网站的文档根目录中(或者至少是其中的别名)? access_log 中失败请求的 URL 是什么?
  • 我不想这么说,但是...很可能它不存在(或者更确切地说,那里有一个文件名称略有不同...注意空格字符等) .
  • 感谢 cmets Marc & Wrikken,根据编辑更改 favicon.ico 文件的分辨率后,我发现了问题。

标签: apache lamp


【解决方案1】:

(在问题编辑中回答。转换为社区 wiki 答案。参见Question with no answers, but issue solved in the comments (or extended in chat)

OP 写道:

图标是 32x32,这似乎就是原因。我用一个 16x16 favicon.ico 文件替换,我不再收到此错误。

我进一步不明白的是为什么我会得到这个 - 大概是一些设置,因为我在托管网站上有一个 apache 服务器,具有相同的 32x32 favicon,但它出现在那里并且没有错误。

【讨论】:

    猜你喜欢
    • 2012-11-06
    • 2012-06-21
    • 1970-01-01
    • 2023-01-13
    • 2010-10-07
    • 2015-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多