Reverse proxy Kibana

Hello,

I was having the same issue as what was stated above, and I solved it with help from the following post. http://serverfault.com/questions/681238/kibana4-nginx-reverse-proxy-using-location-kibana4-not-found-404

This is my nginx snippet for Kibana,

location ~ ^/kibana/(.*)$ {
        rewrite /kibana/(.*) /$1 break;
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

A single note on the above snippet, proxy_pass passes the entire path with the request, and we dont want to pass along the "/kibana" so we need to remove it with a rewrite! and that what is causing the 404.

I also had to set my basepath in kibana to "/kibana".

5 Likes