x_forward_for header data

Avatar
  • updated
I recently noticed that when viewing site reports that I am getting my load balancer address in the report rather than the x_forward_for header information. Is there a way to have Weblog Expert display that info?
Avatar
Michael
What log format do you use?

WebLog Expert can recognize this field in the IIS logs if it is called X-Forwarded-For or cs(X-Forwarded-For) in the log header (character case isn't important). If you use another header name, you need to change it to one of the mentioned above in the IIS settings.

If you use Apache logs, you may need to specify custom log format in the profile properties to set the program to recognize the IPs correctly.
Avatar
R Smith
Sorry, That info would help wouldnt it. :-) Im running IIS 7 on my web servers. Im just unsure how to get Weblog Expert to find that header information .
Avatar
Michael
Do you already include the X-Forwarded-For field in your IIS logs? The default log format in IIS 7 doesn't have this possibility.

Logging the X-Forwarded-For field in IIS 7 requires installing the Advanced Logging module. You can find information on setting IIS to log this field with this module at http://blog.loadbalancer.org/iis-and-.... You can also find additional information on this module at http://www.iis.net/learn/extensions/a....

If you already use the Advanced Logging module, you need to set the header for the real visitor IP field to X-Forwarded-For for the program to be able to recognize it.