# Kibana 4 behind reverse proxy with URL "directory" prefix

**URL:** <https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227>\
**Category:** Kibana\
**Created:** [August 11, 2015, 9:37pm UTC](https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227 "2015-08-11T21:37:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecweaver](https://avatars.discourse-cdn.com/v4/letter/e/e19b73/32.png) [@ecweaver](https://discuss.elastic.co/u/ecweaver)\
**Post date:** [August 11, 2015, 9:37pm UTC](https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227/1 "2015-08-11T21:37:49Z")

</div>

We have to run Kibana 4 behind a reverse proxy, using Apache, due to Single-Sign-On requirements. I have set up a reverse-proxy for the prefix k4/ to proxy out to localhost:5601. The URLs come back without the prefix, and I'm wondering if there's some place in config.yml or app.js or such, where I can set the /k4 prefix for URL composition.  
Thanks.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 12, 2015, 5:42am UTC](https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227/2 "2015-08-12T05:42:20Z")

</div>

At least Kibana 4.1 works fine behind a reverse proxy. I have the following in my Apache configuration:

```
ProxyPass /kibana4/ http://localhost:5601/
ProxyPassReverse /kibana4/ http://localhost:5601/

```

The trailing slashes are significant.

---

<div class="post-metadata">

**Author:** ![ecweaver](https://avatars.discourse-cdn.com/v4/letter/e/e19b73/32.png) [@ecweaver](https://discuss.elastic.co/u/ecweaver)\
**Post date:** [August 12, 2015, 3:43pm UTC](https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227/3 "2015-08-12T15:43:44Z")

</div>

Indeed they were! Thank you, that fixed this problem!

---

<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:** [July 6, 2017, 2:14pm UTC](https://discuss.elastic.co/t/kibana-4-behind-reverse-proxy-with-url-directory-prefix/27227/4 "2017-07-06T14:14:57Z")

</div>


