OK. My nginx IP is 172.20.19.18. I need to add 'set_real_ip_from
172.16.0.0/12' and now it can replace remote_addr with proxy_protocol.
Thanks a lot.
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,276542,277033#msg-277033
___
nginx mailing l
Hello!
On Thu, Sep 28, 2017 at 04:54:41PM +0300, Maxim Dounin wrote:
> Hello!
>
> On Wed, Sep 27, 2017 at 10:38:45PM -0400, fengx wrote:
>
> > The config is rather simple as following. My test version is 1.7.2, a bit
> > old. I can't upgrade to the latest one in our production for now. Anyway I
Hello!
On Wed, Sep 27, 2017 at 10:38:45PM -0400, fengx wrote:
> The config is rather simple as following. My test version is 1.7.2, a bit
> old. I can't upgrade to the latest one in our production for now. Anyway I
> think it should work in 1.7.2 because the document says proxy_protocol was
> int
The config is rather simple as following. My test version is 1.7.2, a bit
old. I can't upgrade to the latest one in our production for now. Anyway I
think it should work in 1.7.2 because the document says proxy_protocol was
introduced from 1.5.12.
http {
log_format combined '$proxy_protocol_ad
Hello!
On Tue, Sep 26, 2017 at 07:02:33AM -0400, fengx wrote:
> I have the setting as follow:
>
> real_ip_header proxy_protocol;
> real_ip_recursive on;
> set_real_ip_from 192.168.1.0/24;
>
> For example, when I send request to nginx from 10.0.0.1,
> $proxy_protocol_addr prints 10.0.0.1, wh
I have the setting as follow:
real_ip_header proxy_protocol;
real_ip_recursive on;
set_real_ip_from 192.168.1.0/24;
For example, when I send request to nginx from 10.0.0.1,
$proxy_protocol_addr prints 10.0.0.1, which is the original client, but
$remote_addr prints 192.168.1.1 which is our pro
Hello,
I have enabled proxy_protocol like 'listen 8080 proxy_protocol' and can get
the right client address from the $proxy_protocol_addr parameter.
I also set 'real_ip_header proxy_protocol', but it don't change the
$remote_addr parameter. It says 'The proxy_protocol parameter (1.5.12)
changes