How to log the correct Ip having Varnish and Nginx

Posted by linuxaria on Jan 31, 2013 1:06 AM EDT
Mail this story
Print this story

When you run a webserver behind a reverse proxy or HTTP accelerator such as Varnish, the webserver access logs will display the IP of the proxy (generally instead of the end user’s IP. This is a problem when you have a software like webalizer, awstats or similar log file analysis program, because you lose one of the most important information: “Who is the requestor of a page ?”, also having all the access coming from the same IP ( you lose information such as “what’s the browsing pattern of visitors ?” “Is someone trying to do something Nasty ?” In this small how-to I’ll show how to put this information back on your Nginx log files in 2 different ways.

Full Story

» Read more about: Story Type: Tutorial

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.