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

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.

You can use mod_rpaf (Reverse Proxy Add Forward Module)
http://stderr.net/apache/rpaf/

I’m doing this currently with no problems.

On Mon, May 11, 2009 at 10:57 AM, Michael S. [email protected]
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

that was it. thanks.

On Mon, May 11, 2009 at 11:21 AM, Payam C. [email protected]
wrote:

How does your proxy config look like? have you read the wiki site at all?
Module ngx_http_proxy_module

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.

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:

On Mon, May 11, 2009 at 11:32 AM, Michael S. [email protected]
wrote:

Oh i see, i thought you were asking for the nginx part. my bad on that
:slight_smile: