Solved

NGINX and IP Addresses

Posted on 2012-03-23
1
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

737 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