Bad links in webui / use $_SERVER['HTTP_HOST'] or $ZBX_SERVER_NAME instead of $_SERVER['SERVER_NAME']

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Major
    • None
    • Affects Version/s: 2.0.6
    • Component/s: Frontend (F)
    • None
    • Environment:
      nginx/php-fpm

      Hi

      I've 2 server with ipfailover:
      sv.exemple.com is the service address
      sv1.exemple.com and sv2.exemple.com are the addresses of my 2 servers

      I'm using nginx/php-fpm default config (with "server_name sv.exemple.com sv1.exemple.com sv2.exemple.com;"
      If i go on sv2.exemple.com,
      $_SERVER['SERVER_NAME'] = sv.exemple.com
      and $_SERVER['HTTP_HOST'] = sv2.exemple.com

      the problem is in ./frontends/php/include/classes/class.curl.php (line 54)

          1. $this->url = $url = $protocol.'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME'].'?'.$this->getQuery(); ###
            We should use $_SERVER['HTTP_HOST'] or $ZBX_SERVER_NAME

      For exemple, it breaks sv2.exemple.com/zabbix/items.php pagination (link to page 2 is sv.exemple.com/zabbix/items.php?sid=aaaaaaaa&page=2)

            Assignee:
            Unassigned
            Reporter:
            Etienne CHAMPETIER
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: