Roots Discourse

Disable favicon and apple-icon errors in nginx logs

My production server error.log (/srv/www/ consist largely of errors relating to missing favicon.ico or apple-touch-icon files.

GET /favicon.ico HTTP/2.0
GET /apple-touch-icon-152x152-precomposed.png HTTP/2.0

I am looking to disable logging of these to clean up the error logs, before I do so I wanted to test the nginx modification on my development environment first.

However, I don’t get these logs on development. Any idea why? Is it already disabled when on ‘development’?

My approach for the above is (not tested yet):

Disable favicon.ico logs
> /trellis/nginx-includes/

# {{ ansible_managed }}

location = /favicon.ico {
  log_not_found off;

Have not yet found the the equivalent for the Apple icon yet.

To wrap this up, main question is as above:
Why might I not get GET /favicon.ico HTTP/2.0 on my development environment logs?
I somewhat want to enable them, simply to check my config change above would work.

favicon’s are cached aggressively, have you tried from another browser or clearing your cache?

This topic was automatically closed after 42 days. New replies are no longer allowed.