Ad Widget

Collapse

Zabbix behind a reverse proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #1

    Zabbix behind a reverse proxy

    Hi,

    In order to access our internal Zabbix server from Internet, we use a reverse proxy.
    Some operations fail when done through the reverse proxy.

    For example, it appears that HTML code associated to fullscreen button looks like :

    Code:
    <div class="fullscreen menu_icon"
    title="Fullscreen"
    onclick="javascript: document.location = 'http://192.168.0.105:80/zabbix/screens.php?
    Host name used in URL (here an IP address) is only valid within our internal network but fails from Internet.

    I have made following patch on 1.8.3:
    Code:
    # diff -u include/classes/class.curl.php.org include/classes/class.curl.php
    --- include/classes/class.curl.php.org	2010-10-29 13:48:10.721627195 +0200
    +++ include/classes/class.curl.php	2010-10-29 13:49:04.041627079 +0200
    @@ -186,11 +186,12 @@
     	public function getUrl(){
     		$this->formatQuery();
     
    -		$url = $this->protocol ? $this->protocol.'://' : '';
    -		$url .= $this->username ? $this->username : '';
    -		$url .= $this->password ? ':'.$this->password : '';
    -		$url .= $this->host ? $this->host : '';
    -		$url .= $this->port ? ':'.$this->port : '';
    +		$url = '';
    +		//$url = $this->protocol ? $this->protocol.'://' : '';
    +		//$url .= $this->username ? $this->username : '';
    +		//$url .= $this->password ? ':'.$this->password : '';
    +		//$url .= $this->host ? $this->host : '';
    +		//$url .= $this->port ? ':'.$this->port : '';
     		$url .= $this->path ? $this->path : '';
     		$url .= $this->query ? '?'.$this->query : '';
     		$url .= $this->reference ? '#'.urlencode($this->reference) : '';
    It solves this problem but I don't know if it would break something else.

    Does somebody know if this patch is valid ?

    Regards,
    Alixen
    http://www.alixen.fr/zabbix.html
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    It may be better to submit this as a bug, and let things get sorted out that way, this way it does not get forgotten.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • alixen
      Senior Member
      • Apr 2006
      • 474

      #3
      Hi,

      Originally posted by nelsonab
      It may be better to submit this as a bug, and let things get sorted out that way, this way it does not get forgotten.
      You are right.
      Bug opened : https://support.zabbix.com/browse/ZBX-3174

      Regards,
      Alixen
      http://www.alixen.fr/zabbix.html

      Comment

      Working...