Nginx show/set real ip address(public) from Amazon ELB Load Balancer address

By | 2019-08-18

o make it work, we need to add following lines to nginx configuration file:

real_ip_header X-Forwarded-For;
set_real_ip_from 0.0.0.0/0;

It makes nginx to trust an X-Forwarded-For header from anyone, 
which makes Real Ip visible on logs and can be used in other programs 
where real ip is required.

发表回复

您的电子邮箱地址不会被公开。