# Having Kibana Spaces behind their own Reverse Proxy

**URL:** https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500
**Category:** Kibana
**Created:** [February 21, 2019, 10:57pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500 "2019-02-21T22:57:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![attzonko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/attzonko/32/48253_2.png) [@attzonko](https://discuss.elastic.co/u/attzonko)
#### Post date: [February 21, 2019, 10:57pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/1 "2019-02-21T22:57:35Z")

</div>

I am wondering if the following is possible to set up:

Have a vanity url for different spaces. Lets say we have two spaces defined 'foo' and 'bar' in Kibana. What I would like to do is have an url like [foo.example.com](http://foo.example.com) which is proxied to [kibana.example.com/s/foo](http://kibana.example.com/s/foo) and another one [bar.example.com](http://bar.example.com) --\> [kibana.example.com/s/bar/](http://kibana.example.com/s/bar/)

We are using nginx as our reverse proxy. I have tired the following config:

```
server {
    listen 80;
    server_name foo.example.com;
    
    location / {
       client_max_body_size 50M;
       proxy_set_header Connection "";
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Frame-Options SAMEORIGIN;
       proxy_buffers 256 16k;
       proxy_buffer_size 16k;
       proxy_read_timeout 600s;
       proxy_pass http://kibana.example.com:5601/s/foo/;
}

```

It ends up hanging with spinning Kibana Logo. It seems that it is trying to load the Space Chooser page and failing. Has anyone been able to get this to work?

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [February 22, 2019, 3:01pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/2 "2019-02-22T15:01:09Z")

</div>

Unless the user that accesses the URL has has access to only a single space out of the 2 of them , this won't work because Kibana will redirect on login to the root Kibana where it displays the space selector.  
As far as I know, other than having unique users for this, there is no workaround.

---

<div class="post-metadata">

### Author: ![ash74268](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@ash74268](https://discuss.elastic.co/u/ash74268)
#### Post date: [March 6, 2019, 11:16pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/3 "2019-03-06T23:16:23Z")

</div>

I have a similar problem. Is there a way to remove the space selector page and let the user directly show the url being accessed.

e.g. if we redirect user directly to /s/foo/app/kibana, we are getting the space selector page. Instead I would like the user to see the Kibana dashboard directly.

Any inputs would be really helpful.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [March 6, 2019, 11:32pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/4 "2019-03-06T23:32:05Z")

</div>

I think it is possible.  
take dashboard - share - permalink

this link goes straight to user space without space selector. I tested this.  
created foo space, created two dashboard and got a link. close all browser and open again past that link and it went to dashboard page directly

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [March 6, 2019, 11:33pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/5 "2019-03-06T23:33:53Z")

</div>

[http://localhost:5601/s/foo-space/app/kibana#/](http://localhost:5601/s/foo-space/app/kibana#/)

this link goes to kibana space foo-space

---

<div class="post-metadata">

### Author: ![attzonko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/attzonko/32/48253_2.png) [@attzonko](https://discuss.elastic.co/u/attzonko)
#### Post date: [March 7, 2019, 1:47pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/6 "2019-03-07T13:47:43Z")

</div>

@elasticforme your suggestion does not work for reverse proxy situation. It works if you plan on sending people the link to the space so they can access it. But you can’t use that link as the base for a reverse proxy.

---

<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: [April 4, 2019, 1:47pm UTC](https://discuss.elastic.co/t/having-kibana-spaces-behind-their-own-reverse-proxy/169500/7 "2019-04-04T13:47:45Z")

</div>

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