# Context root for Kibana URL

**URL:** <https://discuss.elastic.co/t/context-root-for-kibana-url/29894>\
**Category:** Kibana\
**Created:** [September 24, 2015, 6:00am UTC](https://discuss.elastic.co/t/context-root-for-kibana-url/29894 "2015-09-24T06:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [September 24, 2015, 6:00am UTC](https://discuss.elastic.co/t/context-root-for-kibana-url/29894/1 "2015-09-24T06:00:58Z")

</div>

Hello,  
We are securing Kibana behind nGinx. All setting are done and it asks for id password when we hit URL [http://host.ip.address:5601](http://host.ip.address:5601).

What we want is, there should be context root like "/kibana" Or /central\_logging.

Where to set this? I kibana4.conf under /etc/nginx/conf.d OR somewhere in kibana.yml?  
Below is my Kibana4.conf under nginx conf direcotry.

```
server{
    listen 8001;
    server_name kibana-test1;

    #charset koi8-r;
    #access_log /var/log/nginx/log/host.access.log main;

    location / {
        root /usr/share/nginx/html;
        index index.html index.htm;
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd;
        proxy_pass http://127.0.0.1:5601;
        proxy_read_timeout 90;

  }

        #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

```

Please guide on this.

br,  
Sunil

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 24, 2015, 6:16am UTC](https://discuss.elastic.co/t/context-root-for-kibana-url/29894/2 "2015-09-24T06:16:09Z")

</div>

This is an Nginx question, but I suspect adjusting `location /` to e.g. `location /kibana` will do. Obviously, if you want to serve other data from the root of the URL namespace you'll have to add a new replacement `location /` section.

---

<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:** [July 6, 2017, 2:12pm UTC](https://discuss.elastic.co/t/context-root-for-kibana-url/29894/3 "2017-07-06T14:12:35Z")

</div>


