Hi,
I'm having some difficulties with setting up a reverse proxy in combination with iframes. When using /
as the location browsing to sub.mydomain.com
, the proxy is working but the root location is skipped and I get the normal Kibana dashboard without any of my own html.
When I change location to something like /app/kibana
my own html shows but the iframe isn't loaded.
Is there any way to get this to work?
ServerA: Running NGINX and Kibana
ServerB: Running Elasticsearch, only allows access from ServerA IP
NGINX.conf
server {
listen 80;
listen [::]:80;
root /var/www/sub.mydomain.com/html;
index index.html index.htm index.nginx-debian.html;
server_name sub.mydomain.com;
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:5601/;
}
}
HTML snippet
<div id="container">
<iframe name="frame" iframe id="frame" src="http://localhost:5601/app/kibana#/dashboards"></iframe>
</div>