# Kibana not connecting to Nginx

**URL:** <https://discuss.elastic.co/t/kibana-not-connecting-to-nginx/155935>\
**Category:** Elasticsearch\
**Created:** [November 8, 2018, 4:46pm UTC](https://discuss.elastic.co/t/kibana-not-connecting-to-nginx/155935 "2018-11-08T16:46:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralph\_Lawrence](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ralph_lawrence/32/67088_2.png) [@Ralph\_Lawrence](https://discuss.elastic.co/u/Ralph_Lawrence)\
**Post date:** [November 8, 2018, 4:46pm UTC](https://discuss.elastic.co/t/kibana-not-connecting-to-nginx/155935/1 "2018-11-08T16:46:31Z")

</div>

Is there a basic configuration for using nginx with kibana as a reverse proxy server.

Here is my configuration:

server {  
listen 80 default\_server;  
listen [::]:80 default\_server;  
server\_name \_;  
return 301 https://$host$request\_uri;  
}

upstream websocket {  
server 127.0.0.1:80;  
}

server {  
listen 443 ssl;  
server\_name my\_server;

```
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;

```

location /kibana {  
rewrite ^/kibana/(.\*)$ /$1 break;  
proxy\_pass [http://127.0.0.1:5601](http://127.0.0.1:5601);  
proxy\_http\_version 1.1;  
proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection 'upgrade';  
proxy\_set\_header Host $host;  
proxy\_cache\_bypass $http\_upgrade;  
}

No matter what i try it just wont work.

---

<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:** [December 6, 2018, 4:55pm UTC](https://discuss.elastic.co/t/kibana-not-connecting-to-nginx/155935/3 "2018-12-06T16:55:10Z")

</div>

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