True-Client-IP in the origin
How can I log the True-Client-IP header in Apache logs?
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{True-Client-IP}i\" %q" combineHow to see the real client IP address from your PHP application?
...
auto_preprend_file = /usr/local/bin/set_ip.php
... if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}Last updated
Was this helpful?
