0

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.

user38537
  • 293
  • 3
  • 15
  • 2
    One way would be to provide a favicon.ico. – Gerard H. Pille Jan 10 '22 at 22:09
  • @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. – user38537 Jan 11 '22 at 14:24

0 Answers0