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" to /etc/hosts.
The complete configuration file is as follows.
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/ is bound using /etc/hosts and Docker expose port 4443.
I got blank page respones like
and the other css element are 404.
How to correctly configure the proxy function? Thanks !!