November 28th, 2003, 05:48 AM
Proxy pass without replacitng client IP address
I Have had a few people chewing on this one problem - but we haven't been able to solve it...
I have an Apache server that receives all web requests. If any request has the directory "/wt" in the url the ProxyPass command is used to forward onto another machine (WebTrends) - the syntax I'm using is:
ProxyPass /wt/ http://192.168.4.13/
When this request gets to the WebTrends machine the request is logged as coming from the Apache box - not the clients actual IP address.
By using the ProxyPass command I have lost the originators IP address (not much use for user tracking!).
Is there a solution for making sure the client IP passes through the proxy?
I have trawled through the Apache site and have not been successful finding a command that will do this... Does anyone know if there is a command/directive/switch for this...
Any help appreciated...
December 2nd, 2003, 03:33 PM
not possible 2 log the user information Before it gets passed over by the proxy? sorry i`m no expert in this field. I tried setting my own proxy up with apache and the client machine lost images lol!
another possibility could be to use a webpage to redirect requests, so make a directory on ur first server with an index file that redirects to the other server. This way, ur requests are logged by the index file.
Try it, cos like i say i`m not very gd with Proxy!!!
December 3rd, 2003, 12:17 PM
mod_proxy adds X-Forwarded-For environment variable by default, but it doesn't tell users how to retrieve its value. For that you need to use a 3rd party module called mod_extract_forwarded
Again, the X-Forwarded-For is there, it's all matter of how to retrieve it yourself.
December 5th, 2003, 08:17 AM
Nice one - I'll see if I can get this tested out...
Although looking at the docs it might not be suitable for my version of Apache as it is unsure about v.2...