# Kibana 6.2.3 behind reverse proxy with sub folder?

**URL:** <https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294>\
**Category:** Kibana\
**Created:** [March 30, 2018, 10:30pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294 "2018-03-30T22:30:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mason\_Batley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mason_batley/32/29357_2.png) [@Mason\_Batley](https://discuss.elastic.co/u/Mason_Batley)\
**Post date:** [March 30, 2018, 10:30pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294/1 "2018-03-30T22:30:59Z")

</div>

Hi Gang,

I've been trying to get Kibana up and running at the URL [https://mysite.com/kibana](https://mysite.com/kibana) which is currently getting the beloved 404 error. I'm running the standard docker image and hosting it behind the docker flow proxy which I believe should pass /kibana/ -\> / onto the kibana service, the problem seems to be that brower components aren't loading at the correct URL...

Docker service definition:

kibana:  
image: [docker.elastic.co/kibana/kibana:6.2.3](http://docker.elastic.co/kibana/kibana:6.2.3)  
networks:  
- logging\_nw  
- proxy  
ports:  
- 5601:5601  
environment:  
- xpack.security.enabled=false  
- ELASTICSEARCH\_URL=http://elasticsearch:9200  
volumes:  
- ./Kibana/kibana.yml:/etc/kibana/kibana.yml  
deploy:  
labels:  
- com.df.aclName=proxyPriorityK  
- com.df.notify=true  
- com.df.distribute=true  
- com.df.servicePath=/kibana  
- com.df.port=5601  
- [com.df.serviceDomain=mysite.com](http://com.df.serviceDomain=mysite.com)  
- com.df.reqPathSearchReplace=/kibana/,/  
- com.df.alertName=memlimit  
- com.df.alertIf=@service\_mem\_limit:0.8  
- com.df.alertFor=30s

Kibana config file:  
server.port: 5601  
server.host: "0.0.0.0"  
server.basePath: "/kibana"  
elasticsearch.url: [http://elasticsearch:9200](http://elasticsearch:9200)

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [March 30, 2018, 11:00pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294/2 "2018-03-30T23:00:23Z")

</div>

> brower components aren't loading at the correct URL...

Right. Kibana thinks it is running at `/`, but you are actually putting the assets behind `/kibana`.

You need to configure Kibana with a `server.basePath` setting of `/kibana`. This will cause all the assets in the browser (links, mostly) to use the `/kibana` prefix on their path.

---

<div class="post-metadata">

**Author:** ![Mason\_Batley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mason_batley/32/29357_2.png) [@Mason\_Batley](https://discuss.elastic.co/u/Mason_Batley)\
**Post date:** [March 31, 2018, 12:42pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294/3 "2018-03-31T12:42:41Z")

</div>

> [@Mason\_Batley](#):
>
> server.basePath: "/kibana"

Hi, Yes I'm using that option and pasted my kibana config file at the bottom of the post:

server.basePath: "/kibana"

But i'm seeing in the browser that for example it's trying to load /bundles/... instead of /kibana/bundles...

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0c6200de73ef4170ec2ad405949015c97d9776a0.png)

Any ideas what's missing?

Br, Mason

---

<div class="post-metadata">

**Author:** ![Mason\_Batley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mason_batley/32/29357_2.png) [@Mason\_Batley](https://discuss.elastic.co/u/Mason_Batley)\
**Post date:** [March 31, 2018, 1:50pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294/4 "2018-03-31T13:50:57Z")

</div>

Here is a log entry from kibana when going to [mysite.com/kibana/app/kibana](http://mysite.com/kibana/app/kibana), I can see that the reverse proxy is 'correctly' stripping out the /kibana/ sub folder:

Logging\_kibana.1.uuv4bte9cgcq@privxidaas | {"type":"response","@timestamp":"2018-03-31T13:48:36Z","tags":[],"pid":1,"method":"get","statusCode":200,"req":{"url":"/app/kibana","method":"get","headers":{"cache-control":"max-age=0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36","upgrade-insecure-requests":"1","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,_/_;q=0.8","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9,fi;q=0.8","host":"[mysite.com](http://mysite.com)","x-forwarded-proto":"https","x-forwarded-for":"10.255.0.2"},"remoteAddress":"10.0.1.104","userAgent":"10.0.1.104"},"res":{"statusCode":200,"responseTime":28,"contentLength":9},"message":"GET /app/kibana 200 28ms - 9.0B"}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2018, 1:51pm UTC](https://discuss.elastic.co/t/kibana-6-2-3-behind-reverse-proxy-with-sub-folder/126294/5 "2018-04-28T13:51:01Z")

</div>

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