I\'m trying to breakout the logging of my website based on directory access, so I\'m seeking an elaboration to this answer (or this answer too): In which file do place the sugge
Head Slap!
Regular expression error:
SetEnvIf Request_URI "^/download/.+$" download_access
should be:
SetEnvIf Request_URI "^/download/.*$" download_access
Note the *
versus the +
.
EDIT:
No, it was the regex. Head slap is right.
Have you looked to see if there are places in /etc/apache2/apache2.conf
or in the other included sites files (maybe /etc/apache2/sites-enabled/foo.conf
or /etc/apache2/conf/foo.conf
or something... I use a different distro) that have different CustomLog definitions?
There is more than likely something over-riding your statement. The best place to put the CustomLog directive is in the <VirtualHost>
stanza that defines your site. That way, the directive will have the highest precedence so it will override the server-wide settings. What I think is happening is that your definition is setting a default for the server, but a more specific customlog statement is inside a VirtualHost and overriding it.