If you are a blogger or webmaster self-hosting a WordPress content management system (blog) on rental server space (such as Bluehost), you may have discovered that reader comments and intruder IP addresses are all identical.
The known cause occurs when a reverse proxy using Nginx is paired with an Apache web server to host WordPress, or when using a content delivery network (CDN, such as Cloudflare) to accelerate browsing speeds.
In the former scenario, when a visitor’s original Internet Protocol Address (IP Address) is forwarded through Nginx to Apache, WordPress treats Nginx’s internal IP address as the visitor’s IP. A similar situation occurs in the latter scenario, except visitors access the site through the CDN.
Solution
Locate the wp-config.php configuration file in your server’s website root directory, and add the following code into the file to fix the issue of using the wrong IP address:
/** Mountos: Fix Same Comment IP Issue */if($_SERVER[‘HTTP_X_REAL_IP’]){$_SERVER[‘REMOTE_ADDR’] = $_SERVER[‘HTTP_X_REAL_IP’];}
Support Independent Perspectives & In-Depth Insights
Every thoughtful analysis and candid critique comes from our dedication to truth and quality. We choose not to follow sensational algorithms or clickbait headlines.
Sustaining independent research requires reader support. Make a one-time or monthly contribution, securely processed by Google.
Payments secured by Google · Manage or cancel anytime in your Google Account




Comments