Reverse proxy behind nginx docker container not working Kibana 6.2.3

@spalger,

I wanted to include a curl, per your suggestion:

sh-4.2# curl -v localhost:5601

  • About to connect() to localhost port 5601 (#0)
  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 5601 (#0)
    GET / HTTP/1.1
    User-Agent: curl/7.29.0
    Host: localhost:5601
    Accept: /

< HTTP/1.1 200 OK
< kbn-name: kibana
< kbn-version: 6.3.1
< cache-control: no-cache
< content-type: text/html; charset=utf-8
< content-length: 217
< accept-ranges: bytes
< Date: Wed, 21 Nov 2018 15:55:46 GMT
< Connection: keep-alive
<

var hashRoute = '/app/kibana'; var defaultRoute = '/app/kibana';

hmm, so I guess, I'm still a bit confused. I upgraded to 6.3.1 and now my kibana.yml looks like this:

server.basePath: "/kibana"
server.rewriteBasePath: {basePath}/*

Additionally my nginx config, I removed the trailing slash so it now looks like this:

        location /kibana/ {
                error_page      401 /401$request_uri;
                rewrite         ^/kibana(.*)$   $1      break;
                proxy_pass      http://kibana:5601;
        }

Currently the issue is that the last redirect does not append the server.basePath to the url. This means when I go to https://foo.biz/kibana, I am sent to https://foo.biz/kibana/ which sends me to https://foo.biz/app/kibana, which is an invalid url.

My understanding is that the server.basePath would append the value assigned to it? Such that the value of the last redirect would be https://foo.biz/kibana/app/kibana.

Am I understanding the value of server.basePath?

Finally I wanted to reach out to @jarpy as he seemed to help with a similar issue 126732.

Thank you again