httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] Is this possible with Apache
Date Fri, 10 Oct 2008 15:53:01 GMT
On Fri, 2008-10-10 at 11:52 +0200, wrote:
> This problem:
> Client with IPaddress 1	 opens a webpage( starts CGI script
> on Apache1.)
> (Here on Apache1 is running an application/CGI script)
> That script will fetch a page from  	Apache2.
> So far so easy but I need the  Client's  IPaddress 1 to be recorded  in log of  Apache
2 NOT 
> Apache1's address.
> Something like this
> Client's  IPaddress 1 				Client's  IPaddress 1
> Client ------------------>Apache1  ------------>Apache2
> 			Apache1's addreess
> Is this possible? Or must I use another proxy?
> Thank you for  your reply.
> Lad.

Add an appropriate 'X-Forwarded-For'[1] header with the client's IP
address to the request headers when the CGI script requests the resource
from apache2, and then use mod_rpaf[2] to fixup the request inside
apache2, so that it appears to come from the client, and is logged as

If you are already behind a reverse proxy, you should append to the XFF
header in the request headers from apache1. If you are not, you should
construct a new one (do not trust XFF headers received from clients).




View raw message