Skip to main content
Luxian's Notes

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home

server

By luxian, 19 July, 2017

Disable Apache 2.x logging for favicon.ico or apple-touch-icon

One of the features I like in nginx is the ability to disable logging for certain paths. For example whenever a browser sends a requests for a favicon.ico which doesn't exists the web server will respond with a 404 error but will also write the request to access_log and error_log -- which is totally useless. Most of the time nobody cares about these favicon and apple-touch-icon requests, so logging them is quite useless and is just a waste of CPU cycles and IO throughput.

If you use nginx is quite easy to disable logging for them with something like

location = /favicon.ico { 
  access_log off; 
  log_not_found off; 
} 

But Apache is more tricky to set up, the log configuration is not very straightforward. So here is what I was able to find on this subject after some hours of searching.

Tags

  • server
  • apache
server

Pages

  • Contact
  • My tech
  • Wishlist
RSS feed
Powered by Drupal