Posts in 2022
-
NGINX access_log log the real client IP from X-Forwarded-For/X-Real-IP/cf-connecting-ip instead of the proxy IP
Last Update: in nginx
Have a nginx server receive requests from proxy or behind CDN, how to get client user’s real IP instead of proxy/CDN servers IP in access log? This article provide two solutions based on
log_format
and nginxrealip
module.Problem Have a nginx server receive requests from proxy or behind CDN, how to get client user’s real IP instead of proxy/CDN servers IP in access log? Use cloudflare argo tunnel and nginx log show client ip of 127.0.0.1 or ::1 access_log …