# Nginx reverse proxy for kibana

**URL:** <https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024>\
**Category:** Kibana\
**Created:** [April 30, 2019, 6:42am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024 "2019-04-30T06:42:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRUDHVI\_CHOWDHARY\_NE](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@PRUDHVI\_CHOWDHARY\_NE](https://discuss.elastic.co/u/PRUDHVI_CHOWDHARY_NE)\
**Post date:** [April 30, 2019, 6:42am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024/1 "2019-04-30T06:42:19Z")

</div>

I am using this part in nginx config file

```
location ~ ^/kibana(.*) {
       
        rewrite /kibana/(.*) /$1 break;
        proxy_pass http://core-services-local-nginx-ingress-controller.kube-system:80;
        
        proxy_redirect off;
        proxy_set_header Host "kibana-service-local";
        }

```

but the issue is ,when i do localhost/kibana/ it is redirecting to localhost/app/kibana and displaying 4o4 not found .

 ![12a](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8e61387d9ee3af1bf66da41fee0c2380f27daab.png)

why it is happening? how to resolve this issue?

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [April 30, 2019, 8:28pm UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024/2 "2019-04-30T20:28:31Z")

</div>

Hi there, I'm not an nginx expert, but you may need to set the `server.basePath` setting in `kibana.yml` to `/kibana`. Here are some related threads that have been brought up before which you may find helpful:

- [Nginx reverse proxy setup for Kibana](https://discuss.elastic.co/t/nginx-reverse-proxy-setup-for-kibana/167327)
- [Kibana 5.4 behind Nginx](https://discuss.elastic.co/t/kibana-5-4-behind-nginx/98114/6)
- [Reverse proxy Kibana](https://discuss.elastic.co/t/reverse-proxy-kibana/43647)

---

<div class="post-metadata">

**Author:** ![PRUDHVI\_CHOWDHARY\_NE](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@PRUDHVI\_CHOWDHARY\_NE](https://discuss.elastic.co/u/PRUDHVI_CHOWDHARY_NE)\
**Post date:** [May 2, 2019, 5:21am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024/3 "2019-05-02T05:21:12Z")

</div>

thanks,its working

---

<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:** [May 30, 2019, 5:21am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-kibana/179024/4 "2019-05-30T05:21:20Z")

</div>

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