• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

NGINX and IP Addresses

I am currently using NGINX on Ubuntu 10.10 to load balance one of my websites.  I collect  statistical information from each visitor.  My problem is that the vistitors IP address is not being passed through the load balancer.  The load balancer is instead, passing the public IP address of the load balancer.

Is there a way to fix this?
0
deklinm
Asked:
deklinm
1 Solution
 
nociSoftware EngineerCommented:
What happens is that your load balancer connects to your webserver.
Now some proxy servers can add a X-Fordarded-for header to the HTTP header.
This should then be used in your web server to add to the logging.
See also:
 http://wiki.nginx.org/HttpProxyModule
 http://wiki.nginx.org/HttpRealIpModule
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now