Skip to content

Instantly share code, notes, and snippets.

@zerolab
Last active September 5, 2015 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerolab/509545 to your computer and use it in GitHub Desktop.
Save zerolab/509545 to your computer and use it in GitHub Desktop.
Stop Apache from logging static files
# Apache, Drupal - don't log static files
# http://2bits.com/drupal-performance/reducing-size-and-io-load-apaches-web-server-log-files.html
SetEnvIf Request_URI "\.(jpg|xml|png|gif|ico|js|css|swf|js?.|css?.)$" DontLog
CustomLog /var/log/apache2/access-example.com.log combined Env=!DontLog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment