On 23.03.2012 13:43, issa.goris...@ext.ec.europa.eu wrote:
Hi All,

I have several web applications running on distinct tomcat instances. Apache 
httpd is in front of all the tomcat instances, running as a reverse proxy. 
Authentication is realized at the container side. Access log files are active 
on the httpd side.

What I am missing in the httpd log files is the remote user information. I know 
it is not available via mod_proxy. So I plan to switch to mod_jk. But it is not 
available in mod_jk either. And I would like to contribute on this. I know a 
possible work around would be to include the remote user information in the 
response headers and log this via httpd; but I am not sure I can count on the 
software owners to make the changes in a short time.

Can't you just add a custom response header to your Tomcat responses like

X-REMOTE-USER: MY_USER

and then log the user name in your apache access log by adding %{X-REMOTE-USER}o?

Note that this would mean that the user name is sent out to the internet (via the header), but it might already be part of the reponse pages anyhow.

If you want to strip a response header at Apache and still want to log it, you would need to write a very simple Apache module, which copies the header into an Apache environment variable, then removes the header and you would log the environment variable instead of the original header.

HTH.

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to