Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Because I use pagespeed_mod, my apache web service is behind caching proxy. So then when a user visit my site, LHC get a wrong ip address.
It makes my apache log get a wrong ip too. But I can fix it with this article http://www.techstacks.com/howto/log-client-ip-and-xforwardedfor-ip-in-apache.html
But I can't find out a way to make it work with LHC.
Thanks for your time.
Offline
I can fix it by edit the file in: \lib\core\lhcore\lhipdetect.php
Line 14: return $_SERVER["REMOTE_ADDR"];
Replace with: if ($_SERVER['HTTP_X_FORWARDED_FOR']){ return $_SERVER['HTTP_X_FORWARDED_FOR']; }else{ return $_SERVER['REMOTE_ADDR'];}
But I don't know if it could fix all the problem because I see there are some other $_SERVER["REMOTE_ADDR"] in this file.And with one real visitor, it generated 2 visit: one with the correct ip, one other with the wrong ip.
Offline
Pages: 1