# Can someone share nginx config for reverse proxying Kibana4.4/4,5

**URL:** https://discuss.elastic.co/t/can-someone-share-nginx-config-for-reverse-proxying-kibana4-4-4-5/46326
**Category:** Kibana
**Created:** [April 5, 2016, 5:37am UTC](https://discuss.elastic.co/t/can-someone-share-nginx-config-for-reverse-proxying-kibana4-4-4-5/46326 "2016-04-05T05:37:34Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Vladimir\_Aleksandrov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladimir_aleksandrov/32/9737_2.png) [@Vladimir\_Aleksandrov](https://discuss.elastic.co/u/Vladimir_Aleksandrov)
#### Post date: [February 17, 2017, 1:49am UTC](https://discuss.elastic.co/t/can-someone-share-nginx-config-for-reverse-proxying-kibana4-4-4-5/46326/9 "2017-02-17T01:49:01Z")

</div>

```auto
location ~ /analytics/(?<kibana_uri>.*) {
   proxy_pass http://127.0.0.1:5601/$kibana_uri;
   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;
}
# optional block to handle landing url without trailing slash: `/analytics`
location = /analytics {
   return 302 /analytics/;
}

```

This captures the part after `/analytics/` to a `$kibana_uri` variable, which is then used to set the proxy\_pass destination.

This was tested for Kibana 5.2 too.

---

_[View the full topic](https://discuss.elastic.co/t/can-someone-share-nginx-config-for-reverse-proxying-kibana4-4-4-5/46326)._
