On Thursday 02 August 2007 17:07, Carl Johnstone wrote:
> 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.
>
> 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?

I'd try to put the user_id in a X-... output header on the backend and log it 
as "%{X-...}o" on the frontend. Maybe you can even use mod_headers to remove 
the header before it reaches the browser.

Torsten

Attachment: pgpXFchaYHV4F.pgp
Description: PGP signature

Reply via email to