perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <jvana...@2xlp.com>
Subject Re: reverse proxy/logging problem
Date Thu, 02 Aug 2007 17:37:30 GMT

On Aug 2, 2007, at 11:07 AM, Carl Johnstone wrote:

> I've got a two-apache reverse proxy setup, split over two hosts.
>
> The problem I've got is that I'd like to put the user_id in the  
> access logs so that our log analysis software can make use of it.
>
> Setting apache->user correctly logs the user at the back-end  
> however the IP addresses are wrong, being the internal address of  
> the front-end proxy. Also requests dealt with purely at the front- 
> end aren't logged.

This should help you outright, or you can pull out code for your own use
	http://search.cpan.org/~jvanasco/Apache2-xForwardedFor-0.04/lib/ 
Apache2/xForwardedFor.pm

> Logging at the front-end means all requests are logged with the  
> right IP address. Additional bonuses for me are that those servers  
> are less loaded, and I'd be able to turn off logging at the back- 
> end. However the user_id isn't available.
>
> Is there any easy way to pass the user_id from the back-end in such  
> a way the front-end could log it? Or is there another option?

you should likely be able to roll your own based on the above.


Mime
View raw message