Forum: NGINX Anyone know how to grab X-Forwarded-For from nginx to Apache?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-11 20:08
(Received via mailing list)
In apache I want that to be the REMOTE_ADDR, essentially.

This is like nginx's set_real_ip_from.

I am pretty sure Apache has it and I'm sure people on this list have
used it.
8760b3fd1e6168cad3bb484f598c41ed?d=identicon&s=25 Swish (Guest)
on 2009-05-11 20:28
(Received via mailing list)
You can use mod_rpaf (Reverse Proxy Add Forward Module)
http://stderr.net/apache/rpaf/

I'm doing this currently with no problems.
D0a98f6304ff122ac9b487ff8275d8bb?d=identicon&s=25 Payam Chychi (Guest)
on 2009-05-11 20:30
(Received via mailing list)
On Mon, May 11, 2009 at 10:57 AM, Michael Shadle <mike503@gmail.com>
wrote:
> In apache I want that to be the REMOTE_ADDR, essentially.
>
> This is like nginx's set_real_ip_from.
>
> I am pretty sure Apache has it and I'm sure people on this list have used it.
>
>

How does your proxy config look like? have you read the wiki site at
all?
http://wiki.nginx.org/NginxHttpProxyModule
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-11 20:33
(Received via mailing list)
that was it. thanks.
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-11 20:41
(Received via mailing list)
On Mon, May 11, 2009 at 11:21 AM, Payam Chychi <pchychi@gmail.com>
wrote:

> How does your proxy config look like? have you read the wiki site at all?
> http://wiki.nginx.org/NginxHttpProxyModule

Yes, I know what the wiki site is, I'm the one who suggested the address
even.

It's not an issue of nginx configuration, it's asking for the Apache
counterpart. The other person already told me what I was looking for.
D0a98f6304ff122ac9b487ff8275d8bb?d=identicon&s=25 Payam Chychi (Guest)
on 2009-05-11 21:03
(Received via mailing list)
On Mon, May 11, 2009 at 11:32 AM, Michael Shadle <mike503@gmail.com>
wrote:
>
Oh i see, i thought you were asking for the nginx part. my bad on that
:)
2974d09ac2541e892966b762aad84943?d=identicon&s=25 "坏人" (Guest)
on 2009-05-12 22:44
(Received via mailing list)
X-Forwarded-For是可以伪造的,用这个来判断ip非常不准。我自己就碰到过客户ip是10.0.0.x的情况,原因就是X-Forwarded-For中10.0.0.x是第一个。推荐使用X-Real-IP,若用php则为HTTP_X_REAL_IP

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1909,1921#msg-1921
This topic is locked and can not be replied to.