Set X-Forward in Nginx logs

http://wp.sgrosshome.com/2014/03/03/how-to-configure-nginx-logs-to-show-real-ip-when-behind-a-reverse-proxy/

log_format LB_log '$remote_addr forwarded for $http_x_realip - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /path/to/you/log/directory/your-log-file-name.log LB_log;

 

After that, Nginx needs to be restarted/reloaded, of course 😉