if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
That will only work if you use Cloudflare.Our host also tried adding this:
also no effect.Code:if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
Do they not support NGINX/Varnish? Is this fully managed?Hosting said it's because of the fact that we are running nginx/varnish ?? They said they can't do big changes in that regard. They said they will look at it.
Everything worked perfectly when we first moved to this VPS, then DNS change and this happened. Thanks for the answer Slavik, but what exactly can I do to fix this, I have no experience in this matter. I have access to WHM and cPanel. Any help is greatly appreciated.
Thanks, I've send these to my host. Hopefully this will work.https://www.gypthecat.com/nginx-not-showing-client-ip-and-varnish-not-forwarding-client-ip
https://kx.cloudingenium.com/techno...lient-ip-address-using-varnish-reverse-proxy/
It's pretty much something your hosting provider is going to need to work on.
Yes and yes including SLA. They say it is setup correctly but are still looking for the problem.Do they not support NGINX/Varnish? Is this fully managed?
This seems to have solved it! Definitely one for the FAQ @Brogan . Thanks a lot AndyB.Try adding this to your config.php
PHP:if (isset($_SERVER['HTTP_X_REAL_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP']; }
Note that the exact code depends on server configuration. You can confirm whether the variable being used for the correct IP address is'HTTP_X_FORWARDED_FOR' by navigating to admin.php?tools/phpinfo when logged in to the XenForo ACP.
We use essential cookies to make this site work, and optional cookies to enhance your experience.