And ProxyPreserveHost On seems to do the trick.
Hi bartmoss,
I saw that you resolved your case. I have the same problem and still no resolved.
Can you help me ?
Thanks
DO THIS AT YOUR OWN RISK!
BACK UP ALL YOUR FILES BEFORE YOU START MANUALLY EDITING THE CODE!
I have a solution that works, but it requires some extra code. It differentiates between a web client hitting the web server directly (as in most hosting situations) or hitting the web server through a reverse proxy. I wrote this code a year ago for another site I own that runs behind an Apache reverse proxy I run at home.
I took this code and then added it to a my-hacks.php file I created in the WordPress root directory. Then, I went into the WP-Admin and turned on the my-hacks.php legacy functionality under Settings, Miscellaneous.
Here’s the code:
<?php
function writeIPAddress() {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) == '') {
return $_SERVER['REMOTE_ADDR'];
}
else {
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
}
?>
Then I took the function “writeIPAddress()” specified above and replaced every instance of “$_SERVER[‘REMOTE_ADDR’]” in each PHP file where an IP address is either called for or displayed (such as “comment.php” under the wp-includes folder). Let me know how this works for you.
——————————————–
UPDATE:
I should refine this a bit further … the only file I had to update was comment.php and there was only one place in the code where I replaced the function.
Well we just added
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $list[0];
}
to the top of our wp-config.php on kerala online