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