Support » Plugin: Multiple Domain Mapping on Single Site » SERVER_NAME instead of HTTP_HOST

  • Hi

    We’re testing your plugin for a possible website we are going to develop.

    We found a problem with our configuration (nginx and php-fpm).

    When you define domain in your plugin you are using SERVER_NAME as its value.

    SERVER_NAME with this configuration is not the same as HTTP_HOST, so the plugin is not working.

    We have changed it to get the SERVER_NAME from HTTP_HOST that it’s what the user is really loading in its browser.

    With this line in wp-config.php it’s working well

    $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];

    Do you think it’s interesting changing it in your plugin?

    Best regards and thanks for your plugin!

    Fernando

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy fernando,

    thank you for reporting this issue. looks like you found a good and update-safe workaround, therefore i would like to think a bit over changing this.
    of course i have to be sure that it works fine for all active installations after changing it. do you have any idea if it could cause problems in other environments?

    matt

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy fernando,
    we plan to include a switch in the next version where you can decide if you want to use SERVER_NAME instead of the standard HTTP_HOST. then you can remove your tweak in the wp-config and keep up to date with the plugin 🙂

    matt

    Plugin Author matthias.wagner

    (@matthiaswagner)

    update is out – release 0.1.2
    you should be able to remove your fix and use the plugins option for that now 😉

    Thread Starter Fernando Serer

    (@fserer)

    Hi Matt

    Thank you very much for your help!

    Regards!

    Fernando

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SERVER_NAME instead of HTTP_HOST’ is closed to new replies.