Hi Luna,
It seems that you set CDN or some reverse proxy (eg. varnish). In this case all visitors access to your website through same IP address.
There are some modules for apache/nginx (eg. mod_cloudflare). Also, it’s possible to add custom code into wp-config.php or wp plugin (eg. file into mu-plugins which runs before plugins) which replaces $_SERVER[ 'REMOTE_ADDR' ] with real IP. It requires advanced knowledge and you need to be careful if you want do something like this.
I hope that helps.
Sasa
-
This reply was modified 8 years, 10 months ago by
Saša.
Luna,
Add the following to your wp-config.php:
# Resolve REAL IP issues when behind a Proxy, CDN or Reverse Proxy
if ( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { //check ip from share internet
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { // to check ip is pass from proxy, also could be used ['HTTP_X_REAL_IP ']
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$_SERVER['REMOTE_ADDR'] = $ip; // set ip via complex method because remote_addr could have proxy ip
Thread Starter
Luna
(@lunatrix21)
Thanks – it turned out this was a server side problem with my host. Eventually they resolved it and all fine again now.
Great, thank you for letting us know.
Please consider writing a review for Slimstat as a token of appreciation for the support you received. It would be a nice way to say thank you and to let people know how much you value this plugin:
https://wordpress.org/support/plugin/wp-slimstat/reviews/#new-post
Best,
Jason