Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to log proxies IP

$
0
0
Hi,
Some of my clients use Proxies (like Squid).
I want to log their real ip and the proxy ip.

I tried to do so with this log_format:
log_format compression '$remote_addr - $http_x_forwarded_for - $proxy_protocol_addr - "$request" - $status';

without sucess.

the $remote_adrr contains the proxy ip.
$http_x_forwarded_for is empty.
and $proxy_protocol_addr is empty too.

How can I log the *Real* client IP? (in case that the proxy server sends the X-Forwarded-For header)

Thank you.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>