Hi Michael,
Thanks a lot for your feedback! After so many trials you really lose your brain
We took out
SetEnvIf Request_URI "/phplive/" env=ignore
And we placed this instead, setting the variable ignore
SetEnvIf Request_URI "/phplive/" ignore
We left the CustomLog directive as is
CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/access_log.%Y%m%d"
combined env=!ignore
Thanks again for your great feedback!
Regards,
Manos Sifakis
custom I.T. inc.
mfuhr DeleteThis @fuhr.org (Michael Fuhr) wrote in message news:<3ff0efe5$1_3@omega.dimensional.com>...
> msifakis DeleteThis @customit.com (Manos) writes:
>
> > We are trying to reduce our log files by ignoring hits to certain
> > directories.
> > We are using the SetEnvIf command as illustrated below:
> >
> > SetEnvIf Request_URI "/phplive/" env=ignore
>
> The above directive is setting a variable named "env" to the value
> "ignore", which probably isn't what you meant to do. See the SetEnvIf
> documentation for the correct usage.
>
> > CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/access_log.%Y%m%d"
> > combined env=!ignore
>
> The above is checking for a variable named "ignore", which isn't
> the name of the variable you set with SetEnvIf.
>
> > We have tried different arguments with this command to see if any
> > would work without any result. What are we missing? Does the SetEnvIf
> > need to be within the <IfModule mod_setenvif.c></IfModule> area? Does
> > the CustomLog command need to be placed after that area?
>
> SetEnvIf doesn't need to be in an <IfModule> section. If a directive
> is outside an <IfModule> section then it'll always be used -- that's
> why you get an "Invalid command" error if you use a directive for a
> module that isn't present.
>
> The order of SetEnvIf and CustomLog shouldn't matter. I just did
> some tests and CustomLog did its job correctly whether it was before
> SetEnvIf or after it.
>
> Fix the SetEnvIf and CustomLog directives to use the same variable
> and the problem should be solved.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Conditional Logging Not Working