Welcome! Log In Create A New Profile

Advanced

How to log proxies IP

Posted by Smile123 
How to log proxies IP
June 08, 2014 11:01AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready