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.