Get the real visitor IP behind several proxies (nginx real_ip_recursive) — by Nick M on Server Fault
When traffic passes through more than one proxy (for example a CDN, then a load balancer), nginx logs the wrong client address. The answer explains the realip module's real_ip_recursive option, which walks the X-Forwarded-For chain past your trusted proxies to the real client.
Read the full thread on serverfault.comSource: Get the real visitor IP behind several proxies (nginx real_ip_recursive) by Nick M on Server Fault. Licence: CC BY-SA (Stack Exchange; version depends on post date).
- Source reviewed
- 2026-11-02
- Link checked
- Not yet
- Tested hands-on
- Not by Oddbyte.Me