Quantcast
Channel: WordPress.org Forums » [Jetpack - WP Security, Backup, Speed, & Growth] Support
Viewing all articles
Browse latest Browse all 37459

estepix on "[Plugin: Jetpack by WordPress.com] Comment IP addresses all show up as 127.0.0.1"

$
0
0

I have been struggling with this problem for quite some time until today I found this post:

http://ocaoimh.ie/2011/08/09/speed-up-wordpress-with-apache-and-varnish/

The solution proposed does not imply hacking the code:

Create a file called, for instance, /usr/share/php/real-ip.php with the following contents:

<?php
if ( isset( $_SERVER[ "HTTP_X_FORWARDED_FOR" ] ) ) {
        $_SERVER[ 'REMOTE_ADDR' ] = $_SERVER[ "HTTP_X_FORWARDED_FOR" ];
}
?>

Then add it to your php.ini file, search for:
auto_prepend_file =
And replace with:
auto_prepend_file = /usr/share/php/real-ip.php

It worked like a charm for me!


Viewing all articles
Browse latest Browse all 37459

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>