# Reverse proxy Kibana

**URL:** https://discuss.elastic.co/t/reverse-proxy-kibana/43647
**Category:** Kibana
**Created:** [March 7, 2016, 11:52am UTC](https://discuss.elastic.co/t/reverse-proxy-kibana/43647 "2016-03-07T11:52:27Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![deshymers](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@deshymers](https://discuss.elastic.co/u/deshymers)
#### Post date: [August 10, 2016, 4:05am UTC](https://discuss.elastic.co/t/reverse-proxy-kibana/43647/14 "2016-08-10T04:05:30Z")

</div>

Hello,

I was having the same issue as what was stated above, and I solved it with help from the following post. [http://serverfault.com/questions/681238/kibana4-nginx-reverse-proxy-using-location-kibana4-not-found-404](http://serverfault.com/questions/681238/kibana4-nginx-reverse-proxy-using-location-kibana4-not-found-404)

This is my nginx snippet for Kibana,

```
location ~ ^/kibana/(.*)$ {
        rewrite /kibana/(.*) /$1 break;
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

```

A single note on the above snippet, proxy\_pass passes the entire path with the request, and we dont want to pass along the "/kibana" so we need to remove it with a rewrite! and that what is causing the 404.

I also had to set my basepath in kibana to "/kibana".

---

_[View the full topic](https://discuss.elastic.co/t/reverse-proxy-kibana/43647)._
