title: Kibana did not load properly. After setting up with nginx reverse proxy
body: <p>I have setup the reverse proxy for the aws elastic search endpoint on a server on port 9200. I am trying to access kibana on that particular server with /kibana URI. But I am getting below error.</p>
  
  <pre><code>Kibana did not load properly. Check the server output for more information.
  </code></pre>
  
  <p>Nginx Code: </p>
  
  <p>For ElasticSearch:</p>
  
  <pre><code>server {
      listen 9002;
      location / {
          proxy_set_header   X-Forwarded-For $remote_addr;
          proxy_set_header   Host $http_host;
          proxy_pass         https://search.us-west-2.es.amazonaws.com;
      }
  }
  </code></pre>
  
  <p>For Kibana</p>
  
  <pre><code>location /kibana/ {
          proxy_set_header Host https://search-es.us-west-2.es.amazonaws.com/_plugin/kibana/;
          proxy_set_header X-Real-IP 34.214.177.249;
          proxy_pass https://search-es.us-west-2.es.amazonaws.com/_plugin/kibana/;
          proxy_redirect https://search-es.us-west-2.es.amazonaws.com/_plugin/kibana/ http://ab.cd.ef.g/kibana/;
          }
  </code></pre>
  
  <p>For My App:</p>
  
  <pre><code>location / {
                  proxy_redirect off;
                  proxy_pass http://127.0.0.1:3054;
                  proxy_http_version 1.1;
                  proxy_set_header Upgrade $http_upgrade;
                  proxy_set_header Connection 'upgrade';
                  proxy_set_header Host $host;
                  }
  </code></pre>
  
  <p>I am also getting a lot of below console error. </p>
  
  <pre><code>Failed to load resource: the server responded with a status of 502 (Bad Gateway).
  
  http://ab.cd.ef.g//_plugin/kibana/ui/favicons/favicon.ico
  </code></pre>
  
  <p>Any hint would be appreciated. </p>