You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Hirt <bh...@mobygames.com> on 2009/08/31 18:54:11 UTC

[users@httpd] Question about conditional logging

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 <URL:http://httpd.apache.org/userslist.html> 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: [users@httpd] Question about conditional logging

Posted by Brian Hirt <bh...@mobygames.com>.
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<bh...@mobygames.com>  
> 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 <URL:http://httpd.apache.org/userslist.html> 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 <URL:http://httpd.apache.org/userslist.html> 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: [users@httpd] Question about conditional logging

Posted by Eric Covener <co...@gmail.com>.
On Mon, Aug 31, 2009 at 12:54 PM, Brian Hirt<bh...@mobygames.com> 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 <URL:http://httpd.apache.org/userslist.html> 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