So, whenever a user tries to fetch a file on my Apache server that doesn't exist I get a 404 line in the Access log:

[29/Sep/2010:12:14:45 +0200] "GET /asdf HTTP/1.1" 404

And I also get this in the Error log:

[Wed Sep 29 12:14:45 2010] [error] [client] File does not exist: /www/site/asdf

Is there a way to suppress 404 erros from showing up in the error log- only in the access log?

link|improve this question

43% accept rate
feedback

3 Answers

ErrogLog(http://httpd.apache.org/docs/2.2/mod/core.html#errorlog) have not conditional. You can send the logs to syslog or script and filter it.

link|improve this answer
feedback

Try experimenting with LogLevel directive (http://httpd.apache.org/docs/current/mod/core.html#loglevel). It's not exactly what you want, but it can suit you needs, nevertheless

link|improve this answer
LogLevel seems to be set to always be notice when logging to a flatfile, though... :( – Sandman Sep 29 '10 at 14:01
feedback

Error 404 is defined in defined in httpd.conf or .htacces like so:

ErrorDocument 404 /404.html

You can redirect to index page :

ErrorDocument 404 /index.html

or you can create a blank page blank.html and change config to : ErrorDocument 404 /blank.html

link|improve this answer
I don't think you understand the question. – cwd Nov 9 '11 at 18:46
feedback

Your Answer

 
or
required, but never shown

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