Saturday, April 11, 2015

Forwarding IP Address From Varnish to Apache On Ubuntu & CentOS

Varnish Logo

By default, varnish doesn't forward the public IP of the visitor to the web server such as Apache or Nginx. This makes it harder to detect the visitors' real IP and to read the log files since they will all be displaying the server's IP.

To fix this, Varnish has to be configured to forward the real IP to the webserver.