Question about conditional logging

Question about conditional logging

am 31.08.2009 18:54:11 von Brian Hirt

Hi,

I have a proxy/mod_rewrite server set up between an application and
our users. All of the logging is done on the the application side
which is required because of some custom information that's included
is the logs that the proxy doesn't have access to. The proxy does
have some basic features on it that allows it to block a request
before it even gets to the application, returning a 403 to the user
agent. In these cases, I would like to be able to log these, but
since the site has high traffic, I don't want to turn on combined
logging since it would generate 10G+ daily of unnecessary logs that
are already captured elsewhere. All i'm really interested in is maybe
a few hundred requests out of that entire file.

From the best I can tell, the conditional logging can only be based
on the request data, not the outcome of the rewrite rules. I hope
I'm missing something here, and there are some suggestions on how to
deal with this. Ideally, I'd like to be able to do this with a
vanilla apache/mod_rewrite/mod_proxy setup. I have some thoughts on
how to handle this if I can't solve this my 'ideal' way. One idea is
to create a 403 page in the application that handles the logging i'm
looking for, and have the proxy do an internal redirect to the
application instead of stopping it during the rewrite phase with a
"RewriteRule .* - [forbidden]"

Thanks in advance,

Brian Hirt

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Question about conditional logging

am 31.08.2009 19:12:32 von Eric Covener

On Mon, Aug 31, 2009 at 12:54 PM, Brian Hirt wrote:
> Hi,
>
> From the best I can tell, the conditional logging can only be based on the
> request data, not the outcome of the rewrite rules.

Didn't follow, but can you setup conditional logging and use the "E"
RewriteRule flag as in [E=dontlog:1]

--
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Question about conditional logging

am 31.08.2009 19:14:57 von Brian Hirt

Thank you,

I was only looking at the core apache logging, not the mod_rewrite
logging. I'll check this out.

Kind Regards,

Brian

On Aug 31, 2009, at 11:12 AM, Eric Covener wrote:

> On Mon, Aug 31, 2009 at 12:54 PM, Brian Hirt
> wrote:
>> Hi,
>>
>> From the best I can tell, the conditional logging can only be based
>> on the
>> request data, not the outcome of the rewrite rules.
>
> Didn't follow, but can you setup conditional logging and use the "E"
> RewriteRule flag as in [E=dontlog:1]
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org