Ad Widget

Collapse

Zabbix frontend behind nginx proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fvdhoeven
    Junior Member
    • Apr 2013
    • 11

    #1

    Zabbix frontend behind nginx proxy

    This is my first post so forgive me if I did something wrong.

    I currently have the following configuration:
    A proxy host in DMZ running Nginx.
    A server running zabbix frontend and zabbix server.

    The nginx is configured as follows:
    server {
    listen 10.10.1.202:443 ssl;

    server_name zabbix.vermont24-7.com 85.17.0.84;

    ssl_certificate /etc/nginx/conf.d/certs/zabbix.vermont247.com.cer;
    ssl_certificate_key /etc/nginx/conf.d/certs/zabbix.private.ssl.key;
    location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://10.10.2.102;
    }
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/html;
    }
    }

    So all request to zabbix.vermont24-7.com are forwarded to a server running the zabbix frontend on 10.10.2.102

    Everything is working fine except 1 thing within the zabbix frontend.
    When i'm configuring items for a host, I cannot access the second page. A links in the zabbix frontend are something like this : https://zabbix.vermont24-7.com/zabbi...6c6b19956f4b4d

    Except when I want to go to the second page of the item list. This is presented like this:


    And offcourse I cannot access the internal IP number via a web browser. I have been unable to find were this IP is coming from. Everything else on the frontend works fine and I was hoping that someone on this forum knows how to fix this.
  • fvdhoeven
    Junior Member
    • Apr 2013
    • 11

    #2
    Fixed it!

    I finally figured it out myself. Thanks for the great response

    But for soneone with the same issue, i'll post me solution.
    I just had to add this to the nginx config:
    proxy_set_header Host $host;

    That did the job.

    Comment

    Working...