I\'ve configured Varnish 3 with Apache and it is running perfectly alright. However i\'m unable to get the Client ip logged in Apache logs. I tried a few solutions googling
I think you've had a working config in your pastebin example, this should actually do the trick:
if (req.restarts == 0) {
if (req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}
In your vcl_recv{}.