• Seems that a similar server misconfiguration also fails to set HTTP_HOST in the correct way, so if somebody on such a server moves a blog fom https://example.com/ to https://blog.example.com/ it will end up hanging in an endless redirection loop as HTTP_HOST is still set as example.com

    The plugin solves the IP issue, but not the hostname, maybe you could add this correction as an option (default disabled, enable via filter) in a future update or as own plugin. At the moment I use this added to your proxy-real-ip.php and it corrects the above issue:

    if ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
        $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
    }

    Note: The Plugin URI: wordpressforedu.com seems to lead to nowhere, it should maybe lead here or to a page which also leads here.

    https://www.ads-software.com/extend/plugins/proxy-real-ip/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Parsons

    (@samparsons)

    @ov3rfly, thanks for the report.

    I think that could be a useful addition for some purposes, and it seems to me that it fits in scope of this plugin. I’ll do some testing on our servers first before publishing the change.

    Oh, and thanks for the tip about wordpressforedu.com — need to remove that line from the plugin config too!

    Thread Starter Ov3rfly

    (@ov3rfly)

    The hostname problem happens if e.g. on Apache ProxyPreserveHost is turned off and example.com is preset as host for that vhost and the user tries to install WordPress on www.example.com instead example.com or tries to move an installation later as explained above.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Proxy Real IP] Similar problem also with HTTP_HOST, redirection loop’ is closed to new replies.