3

When I set of a CentOS Apache server, I get these errors in the apache logs.

[Tue Feb 28 12:18:10 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/favicon.ico

touch /var/www/html/favicon.ico would likely solve the problem, but can't favicon.ico be disabled in the apache config somehow?

Sandra
  • 9,973
  • 37
  • 104
  • 160
  • 4
    You won't be able to "disable" favicon from being requested as that's a client-side request. You could create a blank file like you say (Or an actual favicon) if you're just sick of seeing errors, or you could disable logging altogether for favicon.ico – Dan Feb 28 '12 at 11:42

2 Answers2

7

but can't favicon.ico be disabled in the apache config somehow

No, because the users browser is trying to download the file.

Well, it's certainly possible to get rid of the log entries with specifically configured logging, but touch is the easiest fix for that problem, IMHO.

Sven
  • 97,248
  • 13
  • 177
  • 225
7

can do something like these? in apache conf, above your log entry lines:

SetEnvIf Request_URI "^/favicon\.ico$" dontlog

or this:

Redirect 404 /favicon.ico

or this:

<Location /favicon.ico>
    Order Deny,Allow
    Deny from all
    ErrorDocument 404 "No favicon
</Location>
user866581
  • 71
  • 1
  • 1