New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Varnish return 127.0.0.1 or server IP

Started by kironet, April 18, 2015, 02:20:39 PM

Previous topic - Next topic

kironet

Hello,

I have problem, PHP $_SERVER['REMOTE ADDR'] always return 127.0.0.1 or server IP.
How can I fix that? I need client IP address...

Thank

kironet

I fixed this..


sub vcl_recv {
  remove req.http.X-Forwarded-For;
  set    req.http.X-Forwarded-For = client.ip;
}