Skip to content

Instantly share code, notes, and snippets.

@onecooltaco
Created June 23, 2015 01:05
Show Gist options
  • Save onecooltaco/8d6cdc4e34a609f1020c to your computer and use it in GitHub Desktop.
Save onecooltaco/8d6cdc4e34a609f1020c to your computer and use it in GitHub Desktop.
Apache logfiles
#conditional logging
# Create exclusions in apache logs
SetEnvIf Request_URI "^/favicon\.ico$" special
SetEnvIf Request_URI "something.html" special
# no logging:
CustomLog /var/log/httpd/local-access.log combined env=!special
# explicit logging:
# This will exclude the Request_URI from your main log and send them to the special log instead.
CustomLog /var/log/httpd/local-special.log combined env=special
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment