# Iframe not Load Properly with NGINX & Kibana

**URL:** https://discuss.elastic.co/t/iframe-not-load-properly-with-nginx-kibana/218119
**Category:** Kibana
**Created:** [February 6, 2020, 9:01am UTC](https://discuss.elastic.co/t/iframe-not-load-properly-with-nginx-kibana/218119 "2020-02-06T09:01:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ferry1090](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@ferry1090](https://discuss.elastic.co/u/ferry1090)
#### Post date: [February 6, 2020, 9:01am UTC](https://discuss.elastic.co/t/iframe-not-load-properly-with-nginx-kibana/218119/1 "2020-02-06T09:01:25Z")

</div>

Hi **Masters** ,

Kindly need your expertise on Kibana & NGINX config.  
So my Kibana Application and Angularjs is running in the same server and I have enable the connection from internet.

So when i hit **[mydomain.com](http://mydomain.com)**, browser will display my Angular apps.  
Inside my Angular Apps, I have an Iframe which is the url of my Kibana Dashboard.

Everything accessible if I access from a direct URL.

1. [https://mydomain.com](https://mydomain.com) -\> it will go to my Angularjs
2. [https://mydomain.com/kibana](https://mydomain.com/kibana) -\> it will go to my Kibana

It is not working if I tried to get the embeded code from Kibana and put it into my Angular Iframe. Do you happen to know why?

**My current NGINX config as below:**

```
Server {
  listen 80;
  server_name mydomain.com;

  location / {
     root /usr/share/nginx/html;
     try_files $uri $uri/ /index.html;
  }

  location ~ ^/kibana/(.*)$ {
     rewrite /kibana/(.*) /$1 break;
     proxy_pass http://DOMAIN_IP:5601;
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection 'upgrade';
     proxy_set_header Host $host;
     proxy_cache_bypass $http_upgrade;
  }
}

```

**Current Kibana Config as below:**

```
#Server Setup
server.port: 5601
server.host: 0.0.0.0
server.basePath: "/kibana"
path.data: "/app/kibana/data"

```

**My Iframe Code as below:**

```
<iframe src="http://mydomain.com/kibana/s/realtime/app/kibana#/dashboard/fnjd7230-en1c-10l9-bmk4-2d8ks6be2e99?embed=true&_g=()" height="600" width="800"></iframe>

```

Use the same url above, copy the url and open in the new tab, able to work but not in Iframe.

---

<div class="post-metadata">

### Author: ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)
#### Post date: [February 11, 2020, 12:55pm UTC](https://discuss.elastic.co/t/iframe-not-load-properly-with-nginx-kibana/218119/2 "2020-02-11T12:55:33Z")

</div>

Do you see any errors in the browser console?

---

<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 10, 2020, 12:55pm UTC](https://discuss.elastic.co/t/iframe-not-load-properly-with-nginx-kibana/218119/3 "2020-03-10T12:55:44Z")

</div>

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