# Setting https for Kibana with NGINX and a FQDN

**URL:** <https://discuss.elastic.co/t/setting-https-for-kibana-with-nginx-and-a-fqdn/205010>\
**Category:** Kibana\
**Created:** [October 24, 2019, 7:22am UTC](https://discuss.elastic.co/t/setting-https-for-kibana-with-nginx-and-a-fqdn/205010 "2019-10-24T07:22:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![basavyr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basavyr/32/55663_2.png) [@basavyr](https://discuss.elastic.co/u/basavyr)\
**Post date:** [October 29, 2019, 2:58pm UTC](https://discuss.elastic.co/t/setting-https-for-kibana-with-nginx-and-a-fqdn/205010/5 "2019-10-29T14:58:58Z")

</div>

Dear @Brandon_Kobel,  
I tried changing the kibana.yml file, but it still didn't work with that initial config file on the nginx reverse proxy.  
However, after more research, I've come across [this post](https://discuss.elastic.co/t/how-to-update-kibana-dashboard-url-from-app-kibana-to-kibana-app-kibana/163798/2) where the solution is to change the location context for kibana:

```auto
location /kibana {
                  rewrite ^/kibana/?(.*)$ /$1 break;
                  proxy_set_header Connection "";
                  proxy_intercept_errors on;
                  proxy_redirect off;
                  proxy_pass http://localhost:5601;
                  include nginxconfig.io/proxy.conf; #this was added by me after I saw a config generator for NGINX on the web
}

```

After I changed it, it finally worked. Regarding the include file, I found it here:

> **[nginxconfig.io](https://nginxconfig.io/)**
>
> NGiИX configuration generator: HTTPS, HTTP2, CDN, PHP, HHVM, Frontend, Reverse proxy, Node.js, WordPress, Drupal, Magento, Python, Django, security headers, rate limiting, expiration by file types…

  
It is a super useful website which helps you generate config files for your web servers.

I think this whole time, my issue was related with nginx not being able to access kibana files due to non-root access (??)

Fortunately, now I am able to access Kibana with my domain, with full TLS encryption and valid ssl certificate.

Thank you!

PS: I did the same set-up for elasticsearch reverse proxy (with the `/elastic` location context) and that also works like a charm 🙂

---

_[View the full topic](https://discuss.elastic.co/t/setting-https-for-kibana-with-nginx-and-a-fqdn/205010)._
