# Nginx reverse proxy for elastic cloud kibana page

**URL:** <https://discuss.elastic.co/t/nginx-reverse-proxy-for-elastic-cloud-kibana-page/353543>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [February 19, 2024, 6:46am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-elastic-cloud-kibana-page/353543 "2024-02-19T06:46:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hanase/32/40115_2.png) [@hanase](https://discuss.elastic.co/u/hanase)\
**Post date:** [February 19, 2024, 6:46am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-elastic-cloud-kibana-page/353543/1 "2024-02-19T06:46:50Z")

</div>

Hi,

I'd like to use nginx to proxy\_pass a custom domain to elastic cloud kibana page.

I tried some configurations from the discussion as well as this article.

### https://xeraa.net/blog/2020\_custom-domains-and-anonymous-access-on-elastic-cloud/

I'm testing in localhost, so binding domain name "[my.domain.com](http://my.domain.com)" to /etc/hosts.

The complete configuration file is as follows.

```auto
server {
    listen 443 ssl;
    server_name my.domain.com;
    ssl on;
    ssl_certificate /etc/ssl/my.domain.com.crt;
    ssl_certificate_key /etc/ssl/my.domain.com.key;
    location /dir/ {

        proxy_pass https://digiv4.kb.us-central1.gcp.cloud.es.io:9243/app/home/;
        proxy_redirect https://digiv4.kb.us-central1.gcp.cloud.es.io http://my.domain.com/;
        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-Found-Cluster digiv4.kb;

        proxy_http_version 1.1;
        proxy_set_header Connection "Keep-Alive";
        proxy_set_header Proxy-Connection "Keep-Alive";
        proxy_set_header Authorization "Basic { **marking_pw** }";
    }

}

```

when I access the nginx page...

My URL [https://my.domain.com:4443/dir/](https://my.domain.com:4443/dir/) is bound using /etc/hosts and Docker expose port 4443.

I got blank page respones like

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

and the other css element are 404.

 ![圖片](https://us1.discourse-cdn.com/elastic/original/3X/2/d/2de0b5c557fdff4364c0ff846aba00fb5e117a79.png)  
 ![圖片](https://us1.discourse-cdn.com/elastic/original/3X/4/0/402067dea9b9d1152ed9d82ddc4fae24b21dad01.png)

How to correctly configure the proxy function? Thanks !!

---

<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:** [March 18, 2024, 6:47am UTC](https://discuss.elastic.co/t/nginx-reverse-proxy-for-elastic-cloud-kibana-page/353543/2 "2024-03-18T06:47:04Z")

</div>

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