Welcome! Log In Create A New Profile

Advanced

Re: x-forward-header / x-real-ip

April 21, 2009 04:24PM
On Tue, Apr 21, 2009 at 12:41:16PM -0700, Payam Chychi wrote:

> hey guys,
>
> what is the main difference between these two? reading the
> documentation it looks like both set the ip address of the client on
> the request which allows you to pass the real client ip address to a
> backend server via nginx proxy... or i could be totally wrong here!
>
> I was looking on the site for an example as to how the config would
> look if I wanted to let the backend know of the real client ip address
> that is requesting the connection... need this for load balancing.:

X-Forwared-For is header where proxy servers usually add client addresses:
"192.168.1.1, 10.10.10.1, 10.10.1.1". The variable $proxy_add_x_forwarded_for
does this addition. X-Real-IP is non standard header, where nginx
sets client addresses. Usually you need just one of the them.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

x-forward-header / x-real-ip

Payam Chychi April 21, 2009 03:41PM

Re: x-forward-header / x-real-ip

Igor Sysoev April 21, 2009 04:24PM

Re: x-forward-header / x-real-ip

Payam Chychi April 21, 2009 04:51PM

Re: x-forward-header / x-real-ip

Payam Chychi April 22, 2009 03:26AM

Re: x-forward-header / x-real-ip

Igor Sysoev April 22, 2009 07:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 286
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready