Solved

NGINX and IP Addresses

Posted on 2012-03-23
1
362 Views
Last Modified: 2012-03-26
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
Comment
Question by:deklinm
1 Comment
 
LVL 40

Accepted Solution

by:
noci earned 500 total points
ID: 37759596
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now