Kibana via nginx proxy


(artem) #1

Hello, i have ELK stack in one container and it's working (accessible via container port).
I wanna set up access to kibana interface via nginx (proxy_pass directive), but when i enter url, i've got the followong error message: Kibana did not load properly. Check the server output for more information.

Here is my nginx config (truncated):

#Kibana

upstream kibana {
server 127.0.0.1:5601;

keepalive 4096;

}

location /kibana/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://kibana/app/kibana;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 900s;
}

Please help.


(Matt Bargar) #2

Have you configured the server.basePath setting in kibana.yml? https://www.elastic.co/guide/en/kibana/current/settings.html


(artem) #3

Hello, thanks for the reply.
No, server.basePath isn't set. I've tryed to set it like /opt or /opt/kibana (location of kibana base directory in the container fs), but if it's set - kibana process always fails without logs. . .


(Matt Bargar) #4

server.basePath should be set to the path kibana lives under in your nginx proxy. It looks like you have nginx configured to use /kibana/ so server.basePath should also be /kibana/. Can't remember for sure if you need to include the slashes or not. Also, when nginx forwards the request to kibana it needs to remove that /kibana/ portion first.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.