Tag: varnish
-
varnish+nginx as backend and real IP
With default config nginx all IP addresses shows as localhost. Here is configuration to show real client IP. Snippet from varnish config: sub vcl_pipe { set bereq.http.connection = “close”; if (req.http.X-Forwarded-For) { set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; } else { set bereq.http.X-Forwarded-For = regsub(client.ip, “:.*”, “”); } } sub vcl_pass { set bereq.http.connection = “close”; if…