Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6618

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

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.0.6
    • Frontend (F)
    • None
    • 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)

            Unassigned Unassigned
            etienne.champetier Etienne CHAMPETIER
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: