apache CustomLog with multiple env?

I have 2 CustomLog statements:

# SVN-ACTION is default env
CustomLog logs/svn_access_log common env=SVN-ACTION
SetEnvIf Request_Method GET GET-ACTION
CustomLog logs/get_access_log common env=GET-ACTION

That works, but the CustomLog statement below doesn't work... it prints an error:

CustomLog logs/ssl_access_log common env=!GET-ACTION env=!SVN-ACTION

How can I use multiple env conditions in CustomLog?


use this:

CustomLog logs/ssl_access_log common \ "expr=(-z reqenv('GET-ACTION') && -z reqenv('SVN_ACTION'))"

the whole third argument seems to need double quotes. quoting right-side of "=" only is not enough.

syntax tested with version 2.4.34.


In Apache 2.4 you can use an expression.

For example:

CustomLog logs/ssl_access_log common \
  "expr=-z reqenv('GET-ACTION') && -z reqenv('SVN_ACTION')"