Solutions

In a reverse proxy configuration, is it possible for an APACHE web server to see the original client IP address?

Solutions ID:    KB3889
Version:    1.0
Status:    Published
Published date:    07/13/2010
 

Problem Description

In a reverse proxy configuration, is it possible for an APACHE web server to see the original client IP address?
My APACHE web server only sees my ProxySG's IP address.  How can I get Apache to see the client's IP address?
 

Resolution

There are two parts to this solution.  The first part is the proxy needs to be configured to foward the IP address to Apache.  The second part is that Apache needs to save the X-Forwarded-for header into the log.

On the proxy:

Ensure that  "X-forwarded-for" header is added. For more information on how to do this please see KB2996.

On the APACHE server log format:

Use custom format string:

%{X-forwarded-for}i

 

 

 

 


Rate this Page

Please take a moment to complete this form to help us better serve you.

Did this document help answer your question?
 
 
If you are finished providing feedback, please click the RATE CONTENT button. Otherwise, please add more detail in the following text box and then click RATE CONTENT.
 
 

Your response will be used to improve our document content.

Ask a Question