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.
Michael S. (Guest)
on 2009-05-11 22: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.
Swish (Guest)
on 2009-05-11 22: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.
Payam C. (Guest)
on 2009-05-11 22:30
(Received via mailing list)
On Mon, May 11, 2009 at 10:57 AM, Michael S. 
<removed_email_address@domain.invalid>
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
Michael S. (Guest)
on 2009-05-11 22:33
(Received via mailing list)
that was it. thanks.
Michael S. (Guest)
on 2009-05-11 22:41
(Received via mailing list)
On Mon, May 11, 2009 at 11:21 AM, Payam C. 
<removed_email_address@domain.invalid>
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.
Payam C. (Guest)
on 2009-05-11 23:03
(Received via mailing list)
On Mon, May 11, 2009 at 11:32 AM, Michael S. 
<removed_email_address@domain.invalid>
wrote:
>
Oh i see, i thought you were asking for the nginx part. my bad on that
:)
"坏人" (Guest)
on 2009-05-13 00: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.