# Running Kibana behind Nginx

**URL:** <https://discuss.elastic.co/t/running-kibana-behind-nginx/83981>\
**Category:** Kibana\
**Created:** [April 28, 2017, 8:40am UTC](https://discuss.elastic.co/t/running-kibana-behind-nginx/83981 "2017-04-28T08:40:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sLuvpreet33](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sluvpreet33/32/50626_2.png) [@sLuvpreet33](https://discuss.elastic.co/u/sLuvpreet33)\
**Post date:** [April 28, 2017, 8:40am UTC](https://discuss.elastic.co/t/running-kibana-behind-nginx/83981/1 "2017-04-28T08:40:18Z")

</div>

I am trying to run Kibana behind nginx, but it does not seem to work.  
Kibana is latest version (5.3.1) on ubuntu 16.04

This is the nginx configuration,

```
      location ~ ^/kibana/.* {
            proxy_pass http://localhost:5601;
            rewrite ^/kibana/(.*) /$1 break;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            access_log /var/log/nginx/kibana_access.log custom;
            error_log /var/log/nginx/kibana_error.log debug;
       }

```

This is the from Kibana logs

```
{"type":"response","@timestamp":"2017-04-28T08:39:02Z","tags":[],"pid":21373,"method":"get","statusCode":200,"req":{"url":"/","method":"get","headers":{"host":"vogo-alpha.cloudapp.net","x-forwarded-for":"106.51.65.208","connection":"close","user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","upgrade-insecure-requests":"1"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1"},"res":{"statusCode":200,"responseTime":20,"contentLength":9},"message":"GET / 200 20ms - 9.0B"}

```

What is wrong with the configuration here ?

---

<div class="post-metadata">

**Author:** ![Xavy](https://avatars.discourse-cdn.com/v4/letter/x/e0b2c6/32.png) [@Xavy](https://discuss.elastic.co/u/Xavy)\
**Post date:** [April 28, 2017, 12:51pm UTC](https://discuss.elastic.co/t/running-kibana-behind-nginx/83981/2 "2017-04-28T12:51:50Z")

</div>

Kibana looks to be answering OK (200 HTTP code) so I would check the access/error\_log on nginx

---

<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 26, 2017, 12:58pm UTC](https://discuss.elastic.co/t/running-kibana-behind-nginx/83981/3 "2017-05-26T12:58:08Z")

</div>

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