Nginx & Kibana 7.0.0 setup woes


#1

Hi,

I'm trying to set up a nginx reverse proxy to sit in front of my Kibana box. Both instances (nginx and kibana) are running in a docker environment on one host. The kibana container is named "kibana" - the nginx container is named "reverse-proxy".

I have set up my nginx box so that redirection is working - tested it with the following:

server {
  listen 80;
  listen [::]:80;

  server_name my.server.com;

   location / {
      proxy_pass http://bbc.co.uk;
      proxy_read_timeout 90;
   }
}

Now I need to set it up to forward to my Kibana container. The Kibana container is not exposed to the the host but is accessible on 5601 within docker. The nginx box is exposed to the outside.
I have the following options (related to the proxy setup) configured in my kibana.yml:

server.rewriteBasePath: true
server.basePath: "/kibana"
server.host: "kibana"

I've changed the proxy_pass to:

server {
  listen 80;
  listen [::]:80;

 server_name my.server.com;

   location / {
      proxy_pass http://kibana:5601;
#      proxy_pass http://bbc.co.uk;
      proxy_read_timeout 90;
   }
}

After restarting the containers, when I head to http://my.server.com, all I see is a "Not Found".

I'm not entirely sure what I'm missing but it's obvious that it has to be something to so with the kibana.yml file itself as I can get the forwarding to work if I forward to a different site.

Any suggestions welcomed!


#2

Managed to fix it so for any in the same boat:

kibana.yml
server.host: "kibana"
server.basePath: ""
server.rewriteBasePath: false