# Nginx and Kibana with auth basic

**URL:** <https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306>\
**Category:** Kibana\
**Created:** [January 8, 2019, 5:37am UTC](https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306 "2019-01-08T05:37:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_H\_Viraktamath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh_h_viraktamath/32/37044_2.png) [@Mahesh\_H\_Viraktamath](https://discuss.elastic.co/u/Mahesh_H_Viraktamath)\
**Post date:** [January 8, 2019, 5:37am UTC](https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306/1 "2019-01-08T05:37:45Z")

</div>

I followed this post to configure a reverse proxy using Nginx for Kibana

> [@Kibana and Nginx in subpath](https://discuss.elastic.co/t/kibana-and-nginx-in-subpath/90280):
>
> I've tried without success several configurations to get Kibana 4.5.4 to work in [https://myhost/kibana](https://myhost/kibana) Nginx configuration 1: server { listen 80; # SSL configuration listen 443 ssl http2 default\_server; listen [::]:443 ssl http2 default\_server; include snippets/self-signed.conf; include snippets/ssl-params.conf; auth\_basic "Restricted Access"; auth\_basic\_user\_file /etc/nginx/htpasswd.users; location ~ (/elasticsearch/|/app/|/bundles/|/kibana|/status|/pl…

It is working fine when I access Kibana UI using this proxy, but I can't access the UI directly from browser i.e. connecting to Kibana on 5601, the error is - {"statusCode":404,"error":"Not Found","message":"Not Found"}.

Do I need to configure something more here?

Thanks.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [January 9, 2019, 1:34am UTC](https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306/2 "2019-01-09T01:34:51Z")

</div>

Are you setting `server.basePath` in Kibana.yml? If so, then all requests must include the basepath

---

<div class="post-metadata">

**Author:** ![Mahesh\_H\_Viraktamath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh_h_viraktamath/32/37044_2.png) [@Mahesh\_H\_Viraktamath](https://discuss.elastic.co/u/Mahesh_H_Viraktamath)\
**Post date:** [January 9, 2019, 5:40am UTC](https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306/3 "2019-01-09T05:40:21Z")

</div>

Yes, it is set in Kibana.yml and I just load http://kibana\_host:5601/bp in the browser, it redirects to http://kibana\_host:5601/bp/app/kibana but then this json response comes up - {"statusCode":404,"error":"Not Found","message":"Not Found"}

---

<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:** [February 6, 2019, 5:40am UTC](https://discuss.elastic.co/t/nginx-and-kibana-with-auth-basic/163306/4 "2019-02-06T05:40:21Z")

</div>

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