perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Gao <>
Subject Re: Question about Apache 2.4 and libapreq2 (Apache2::Request)
Date Fri, 10 Mar 2017 08:05:00 GMT
* JW <> wrote:

> This mod_perl server is behind a proxy on the same machine. Under Apache 2.2, $r->remote_ip()

> returned and not the user's actual IP.  So, a PerlPostReadRequestHandler extracted
the user's 
> IP address from the X-Forwarded-For header and set it with $r->remote_ip( $ip ).
> In Apache 2.4 (and mod_perl now) $c->remote_ip is split into $r->useragent_ip and
> But, $r->useragent_ip (wrongly) gives me Perhaps this'll be fixed at some
point (unlessI'm doing something wrong). So, for now, as above, the IP is extracted from X-Forwarded-For

> and set with $r->useragent_ip( $ip ). 
> I was asked by one of the earlier responders to share my experience with the move to
Apache 2.4,in case there were others in the same boat. So, if there are, jump right in and
good luck!

You might want to configure mod_remote_ip for this:

RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy address.of.your.proxy
RemoteIPTrustedProxy address.of.your.proxy



View raw message