# Kibana behind reverse proxy (nginx) on a different route

**URL:** https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070
**Category:** Kibana
**Created:** [July 7, 2021, 12:34pm UTC](https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070 "2021-07-07T12:34:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mar-ro](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mar-ro](https://discuss.elastic.co/u/mar-ro)
#### Post date: [July 7, 2021, 12:34pm UTC](https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070/1 "2021-07-07T12:34:49Z")

</div>

Hello everybody!

I'm trying to set up a different path than `/` in a Nginx server as reverse proxy. I would like that the users can access to `myserver.com/kibana` and then `https://....elastic-cloud.com:xxxx`is showed. For that, I set up a file in `/etc/nginx/conf.d/` called `kibana_proxy.conf` with the following content:

```auto
server{
   listen 80;
   server_name: myserver.com;
   location /kibana {
      rewrite */kibana/(.*) /$1 break;
      proxy_set_heather Authorization "Basic xxxxxx";
      proxy_pass https://....elastic-cloud.com:xxxx;
   }
}

```

When I access to `myserver.com/kibana` only shows the following message:

`{"statusCode":404,"message":"Cannot GET /s/myspace/spaces/enter","error":"Not Found"}`

`myspace` is the space created and assigned to the user configurated in the line `proxy_set_header Authorization` of nginx configuration file.

What am I doing wrong?

Should I setting up something more in kibana configuration file?

Thank you in advance!

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [July 7, 2021, 6:43pm UTC](https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070/2 "2021-07-07T18:43:49Z")

</div>

@jportner can we please get some help here?

Thank you  
Bhavya

---

<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: [August 4, 2021, 6:44pm UTC](https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070/3 "2021-08-04T18:44:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jportner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jportner/32/75692_2.png) [@jportner](https://discuss.elastic.co/u/jportner)
#### Post date: [August 30, 2021, 9:56pm UTC](https://discuss.elastic.co/t/kibana-behind-reverse-proxy-nginx-on-a-different-route/278070/4 "2021-08-30T21:56:15Z")

</div>

Sorry for the late reply, something is up with my notifications and I just saw this.

@mar-ro I'm not an nginx expert but I noticed that you specified `proxy_set_heather` in your config, I think you meant `proxy_set_header`? Maybe try changing it and see if that works.
