# Unable to use nginx as reverse proxy in kibana

**URL:** <https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876>\
**Category:** Kibana\
**Created:** [April 29, 2019, 9:22am UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876 "2019-04-29T09:22:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [April 29, 2019, 9:22am UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/1 "2019-04-29T09:22:51Z")

</div>

I am unable to use the nginx as reverse proxy in kibana.

kibana dashboard is working fine on 172.25.1.x:5601  
kibana service is working fine

server block in the /etc/nginx/nginx.conf are below:

```
server {
    listen *:80;
    server_name elk-logserver.com;
    location / {
    proxy_pass http://172.25.xx.xx:5601;

    auth_basic "test Property";
    auth_basic_user_file /etc/nginx/.htpasswd;

```

}  
}

port 80 is open on kibana machine.  
kibana and nginx are installed on the same machine.  
nginx -t show the configuration is good.

but I am not able to access the kibana using the reverse proxy domain ([elk-logserver.com](http://elk-logserver.com)).

any change that we need to do on the /etc/hosts file or in the kibana.yaml, do let me know.  
Any inputs.

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [April 29, 2019, 1:01pm UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/2 "2019-04-29T13:01:28Z")

</div>

> [@opensourcengineer](#):
>
> proxy\_pass [http://172.25.xx.xx:5601](http://172.25.xx.xx:5601);

I think this needs a slash at the end: `proxy_pass http://172.25.xx.xx:5601/;`

---

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [May 2, 2019, 11:58am UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/3 "2019-05-02T11:58:47Z")

</div>

its the same issue.

i tried to remove the server block and added a conf file under /etc/nginx/conf.d with the same content but still the same.

---

<div class="post-metadata">

**Author:** ![pchakour](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pchakour](https://discuss.elastic.co/u/pchakour)\
**Post date:** [May 2, 2019, 3:23pm UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/4 "2019-05-02T15:23:00Z")

</div>

Did you try to connect with your Nginx IP address ?  
It's the same issue ?

---

<div class="post-metadata">

**Author:** ![opensourcengineer](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@opensourcengineer](https://discuss.elastic.co/u/opensourcengineer)\
**Post date:** [May 3, 2019, 10:13am UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/5 "2019-05-03T10:13:56Z")

</div>

with ip address it is working fine.

---

<div class="post-metadata">

**Author:** ![pchakour](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pchakour](https://discuss.elastic.co/u/pchakour)\
**Post date:** [May 3, 2019, 1:55pm UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/6 "2019-05-03T13:55:02Z")

</div>

So your Nginx configuration is fine, you have to add into the /etc/hosts of your "local computer" the following line:  
IP\_NGINX\_ADDRESS [elk-logserver.com](http://elk-logserver.com)

"local computer" means the computer that you are using to access the kibana server.

---

<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 31, 2019, 1:55pm UTC](https://discuss.elastic.co/t/unable-to-use-nginx-as-reverse-proxy-in-kibana/178876/7 "2019-05-31T13:55:04Z")

</div>

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