Score:0

Apache ErrorLog skip logging specific message

bd flag

For one of my Apache vhosts, the error log is bloated with messages about "favicon.ico". I don't need these logged. I'm aware of the SetEnvIf directive that can be applied to CustomLog.

Here's my config for the SetEnvIf option and CustomLog directive

SetEnvIfNoCase Request_URI ".*/favicon\.ico.*" DontLogThese
# Other SetEnvIfNoCase matches with DontLogThese
...
CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/access_log 86400" combined env=!DontLogThese
...

This is working for the "access_log" file, but I need to eliminate these messages from the error log as well. ErrorLog only takes one argument, the file name.

Gerard H. Pille avatar
in flag
One way would be to provide a favicon.ico.
user38537 avatar
bd flag
@GerardH.Pille , Thank you. These aren't 404 type error messages. There're rules that prevent some external access to resources. The Apache errors are AH01630 and AH01753, denied by server configuration.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.