# Reverse proxy behind nginx docker container not working Kibana 6.2.3

**URL:** https://discuss.elastic.co/t/reverse-proxy-behind-nginx-docker-container-not-working-kibana-6-2-3/157466
**Category:** Kibana
**Tags:** docker
**Created:** [November 20, 2018, 4:11am UTC](https://discuss.elastic.co/t/reverse-proxy-behind-nginx-docker-container-not-working-kibana-6-2-3/157466 "2018-11-20T04:11:43Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![aap](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aap](https://discuss.elastic.co/u/aap)
#### Post date: [November 21, 2018, 2:28pm UTC](https://discuss.elastic.co/t/reverse-proxy-behind-nginx-docker-container-not-working-kibana-6-2-3/157466/7 "2018-11-21T14:28:34Z")

</div>

@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](https://foo.biz/kibana), I am sent to [https://foo.biz/kibana/](https://foo.biz/kibana/) which sends me to [https://foo.biz/app/kibana](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](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](https://discuss.elastic.co/t/cannot-reach-kibana-in-docker/126732).

Thank you again

---

_[View the full topic](https://discuss.elastic.co/t/reverse-proxy-behind-nginx-docker-container-not-working-kibana-6-2-3/157466)._
