Added on May 31st, 2012 and marked as config nginx server varnish web

Since nginx is running behind Varnish, the log files will show the IP address as the address where the request is coming from. To log the real IP address, you can add the following lines to the nginx configuraton file:

real_ip_header X-Forwarded-For;

nginx will then start logging the correct IP address rather than

In order to use real_ip_header it is important to have HttpRealipModule installed.n (Use nginx -V to get a list of all configured modules.)