Hello John,
For one thing, your regexes look a little strange.
The "|" should be inside the parens, like the following:
"\.(jpg|gif|png|css|js)$"
Thanks,
Mike Rumph
On 4/29/2015 10:27 AM, Rose, John B wrote:
Apache 2.2
We are attempting to set up a referer_log file. But when we add a
CustomLog line specifically for the referer log it will not log, if
our CustomLog line for our access_log is there.
If we comment out the CustomLog line for access_log, then the
CustomLog line for the referer_log logs correctly.
We also just removed the "env=!image-request", it still did not work
Can you tell us what we are doing wrong? Httpd.conf code here …
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
…
SetEnvIf Request_URI "\.(jpg)|(gif)|(png)|(css)|(js)$" onlylog
SetEnvIf Request_URI "\.(jpg)|(gif)|(png)$" image-request
CustomLog /apache/logs/access_log combined env=!image-request
CustomLog /apache/logs/referer_log referer env=onlylog
Thanks