# Redirect Kibana through Sub Location /kibana with Nginx in a cluster

**URL:** <https://discuss.elastic.co/t/redirect-kibana-through-sub-location-kibana-with-nginx-in-a-cluster/100684>\
**Category:** Kibana\
**Created:** [September 15, 2017, 12:47pm UTC](https://discuss.elastic.co/t/redirect-kibana-through-sub-location-kibana-with-nginx-in-a-cluster/100684 "2017-09-15T12:47:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeremyLG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeremylg/32/22144_2.png) [@JeremyLG](https://discuss.elastic.co/u/JeremyLG)\
**Post date:** [September 15, 2017, 12:47pm UTC](https://discuss.elastic.co/t/redirect-kibana-through-sub-location-kibana-with-nginx-in-a-cluster/100684/1 "2017-09-15T12:47:33Z")

</div>

I have a Nginx node and a Kibana node. My Nginx is like this ;

> location /kibana/ {  
> rewrite ^/kibana/(.\*)$ /$1 break;  
> proxy\_pass [http://10.33.1.145:5601](http://10.33.1.145:5601);  
> proxy\_set\_header Host $host;  
> proxy\_set\_header X-Real-IP $remote\_addr;  
> proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
> proxy\_set\_header X-Forwarded-Proto $scheme;  
> proxy\_set\_header X-Forwarded-Host $http\_host;  
> }

But when I go to my domainname/kibana I either get error 404 or error 502 Bad Gateway.

What am I doing wrong ? (I know this question has been asked but none of the solutions work for me !)

tHanks

---

<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:** [October 13, 2017, 12:47pm UTC](https://discuss.elastic.co/t/redirect-kibana-through-sub-location-kibana-with-nginx-in-a-cluster/100684/2 "2017-10-13T12:47:40Z")

</div>

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