Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off-topic by Magellan, Falcon Momot, Jenny D, Scott Pack, TheCleaner Oct 10 '13 at 15:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Magellan, Falcon Momot, Jenny D, Scott Pack, TheCleaner
If this question can be reworded to fit the rules in the help center, please edit the question.

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 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer

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>
share|improve this answer
    
Redirect 404 /favicon.ico worked great –  jchavannes Mar 18 '13 at 0:51
    
First option was really useful. Simple and elegant –  alfredocambera Jul 14 at 20:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.