Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3050096
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: 系统运维

2009-04-23 16:23:12

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.:

Thanks,

 by Igor Sysoev on 2009-04-21T20:54:01+00:00
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.



 by Payam Chychi on 2009-04-21T21:16:38+00:00
2009/4/21 Igor Sysoev :
> 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... =A0or 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.
>
>
> 
Hey Igor,

Thanks, ok so by just having $proxy-add-x-forwarded-for  active in my
proxy.conf,  this should apply itself for all proxyp-pass connections
sent to the backend correct?



 by Payam Chychi on 2009-04-22T07:46:54+00:00
On Tue, Apr 21, 2009 at 1:51 PM, Payam Chychi  wrote:
> 2009/4/21 Igor Sysoev :
>> 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... =A0or 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 addresse=
s:
>> "192.168.1.1, 10.10.10.1, 10.10.1.1". The variable $proxy-add-x-forwarde=
d-for
>> does this addition. X-Real-IP is non standard header, where nginx
>> sets client addresses. Usually you need just one of the them.
>>
>>
>> anyone have anything on this? would greatly be appreciated

thanks,

阅读(4060) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~