FAQ Why Do My Statistics All Report From An Unknown/specific Country
Q: Why do my statistics all report from an unknown/specific country?
A: NATS relies on location identifying dependencies to provide location data. By default, NATS attempts to use MaxMind's GEOIP database. To resolve the unknown country issue, please ensure that the configured location dependency is providing the required data. For testing purposes, you can place the following script in the NATS/www directory:
<? echo 'IP: '.$_SERVER['REMOTE_ADDR'].': You are from '.apache_note("GEOIP_COUNTRY_NAME");?>
If all traffic is being recorded as initiating in the same country, you may be load balanced and not reporting the proper IP address to the server. Ensure that the reported IP address belongs to your server cluster, you need to expose the IP address and configured NATS via the NATS/includes/config.php file by adding the following: $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; The above example assumes that the original surfer IP address is sent in the HTTP header as X_FORWARDED_FOR.