Getting Real IP in Haproxy<=>Nginx configuration

0
2352

Well its a little configuration can get real to nginx when haproxy is set as reverse proxy.

Follow this article for setup

Now in your nginx vhost file at the top add. Replace yourhaproxyip with your haproxy node IP

set_real_ip_from yourhaproxyip;
real_ip_header X-Forwarded-For;