# Reverse proxy using nginx to a specific dashboard

**URL:** https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580
**Category:** Kibana
**Created:** [January 8, 2021, 9:09pm UTC](https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580 "2021-01-08T21:09:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)
#### Post date: [January 8, 2021, 9:09pm UTC](https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580/1 "2021-01-08T21:09:40Z")

</div>

Hello,

I am a bit green in setting up a reverse proxy using nginx and I was hoping someone would help me with the following:

The following is my simple configuration (please suggest more directives if I should include them)

```auto
server {
    listen 80;
    server_name _;

    location / {
        proxy_pass http://localhost:5601/;
    }

    location /boats/ {
        proxy_pass http://localhost:5601/s/boats/app/kibana#/dashboard/ff1752da-af4e-4ef4-ab2c-7d73ffc3108d/;
    }

    location /cars/ {
        proxy_pass http://localhost:5601/s/cars/app/kibana#/dashboard/b825d6b9-4b8e-4bbb-8faa-834beecafd35/;
    }
}

```

Right now, if I visit my domain name, it always redirects me to Kibana's basic authentication.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d17ef1d8e552b93334e2a777907526319359159f.png)

If I remove the root location

```auto
    location / {
        proxy_pass http://localhost:5601/;
    }

```

then I try to visit my domain name/boats/ location, I receive a 404 Not Found error

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/5/551a1f197dcab858c0c92661afe722ef14762294.png)

I'm guessing since I'm not login at this point, when redirecting to Kibana's basic authentication, it is not including the port?

This is my set up:

Elasticsearch 7.10.1 using Elastic hosted service  
Kibana 7.10.1 on AWS instance(s) behind an ALB where I have basic authentication set up

Mike

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [January 11, 2021, 12:34pm UTC](https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580/2 "2021-01-11T12:34:53Z")

</div>

So your goal is to redirect users to a specific dashboard when visiting a space in the Kibana instance?

You should be able to simply use the `defaultRoute` advanced setting for this:

 ![Screenshot 2021-01-11 at 13.34.08](https://us1.discourse-cdn.com/elastic/original/3X/7/2/7267dcdc97d68bf1046f10a1a988d067782e4cce.png)

---

<div class="post-metadata">

### Author: ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)
#### Post date: [January 11, 2021, 3:14pm UTC](https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580/3 "2021-01-11T15:14:18Z")

</div>

Actually, I'm looking for the user to be redirected to a specific dashboard and not the dashboard page in general.

Mike

---

<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 8, 2021, 3:14pm UTC](https://discuss.elastic.co/t/reverse-proxy-using-nginx-to-a-specific-dashboard/260580/4 "2021-02-08T15:14:23Z")

</div>

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