Ip visitor = host ip :X


I have a problem with the no footprint solution. All stats are ok except the visitor ip.

in my config.ini.php i tried to use without success :

trusted_hosts[] = “stats.xxx.com”// my admin piwik domain -> this domain user reverse ip
proxy_client_headers[] = HTTP_CF_CONNECTING_IP
proxy_client_headers[] = HTTP_CLIENT_IP
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST
proxy_ips[] =
proxy_ips[] =
proxy_ips[] =

I use 3 reverse ip on this host but same problem on other host, i have always the ip from the host and not from the visitor.

Thanks for you help.

create test.php

<?php var_dump($_SERVER); where does the IP appear?

I just replace real ip by my_ip (visitor) and ip_host

array(29) { ["DOCUMENT_ROOT"]=> string(27) "/home/domain/sd/stats/www" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["HTTP_ACCEPT"]=> string(3) "*/*" ["HTTP_ACCEPT_ENCODING"]=> string(13) "gzip, deflate" ["HTTP_ACCEPT_LANGUAGE"]=> string(2) "fr" ["HTTP_CONNECTION"]=> string(10) "Keep-Alive" ["HTTP_COOKIE"]=> string(45) "PIWIK_SESSID=e2ca5754568057b7b3b40f126ec7ca4" ["HTTP_HOST"]=> string(31) "stats.domaine.com" ["HTTP_USER_AGENT"]=> string(155) "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB7.4; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)" ["PATH"]=> string(13) "/bin:/usr/bin" ["QUERY_STRING"]=> string(0) "" ["REDIRECT_STATUS"]=> string(3) "200" ["REMOTE_ADDR"]=> string(11) "MY_IP" ["REMOTE_PORT"]=> string(4) "2895" ["REQUEST_METHOD"]=> string(3) "GET" ["REQUEST_URI"]=> string(9) "/test.php" ["SCRIPT_FILENAME"]=> string(36) "/home/domain/sd/stats/www/test.php" ["SCRIPT_NAME"]=> string(9) "/test.php" ["SERVER_ADDR"]=> string(13) "HOST_IP" ["SERVER_ADMIN"]=> string(35) "webmaster@domain.com" ["SERVER_NAME"]=> string(31) "stats.domain.com" ["SERVER_PORT"]=> string(2) "80" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["SERVER_SIGNATURE"]=> string(120) "
Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8o Server at stats.domain.com Port 80
" ["SERVER_SOFTWARE"]=> string(50) "Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8o" ["PHP_SELF"]=> string(9) "/test.php" ["REQUEST_TIME"]=> int(1354797271) ["argv"]=> array(0) { } ["argc"]=> int(0) } 

Thanks for ur help

Matt do you have any solution please ?

I have some ip balancer for my websites on this host but my stats host are not on ip balancer

<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "http://www.domaine.com/" : "http://www.domaine.com/"); 
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.php' type='text/javascript'%3E%3C/script%3E")); 
<script type="text/javascript"> 
try { 
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 26); 
} catch( err ) {}