Skip to content

Instantly share code, notes, and snippets.

@dubcl
Created June 11, 2018 20:47
Show Gist options
  • Save dubcl/c72754de7a8810bd97c87f38c02642fb to your computer and use it in GitHub Desktop.
Save dubcl/c72754de7a8810bd97c87f38c02642fb to your computer and use it in GitHub Desktop.
Apache don't log
<VirtualHost *:80>
ServerName www.mywebsite.com
DocumentRoot /home/www/mywebsite
...
SetEnvIf Request_URI "(.*)foo(.*)" dontlog
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined env=!dontlog
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment