1

I have setup ELK using docker (https://github.com/deviantony/docker-elk).

Then I added a subdomain to nginx with this config:

location / {
   auth_basic           "closed site";
   auth_basic_user_file /var/www/passwd;
   proxy_http_version 1.1;
   proxy_set_header Connection "Keep-Alive";
   proxy_set_header Proxy-Connection "Keep-Alive";
   proxy_pass http://localhost:5601;
}

When I now visit this subdomain I see that Kibana loads but then fails.

This is what my browser console shows: enter image description here

When I visit Kibana directly using the IP of my server and the port 5601 it runs flawlessly. This only happens when being proxy_passed through nginx.

Sebastian Grebe
  • 657
  • 1
  • 8
  • 23
  • I assume basic auth is the issue here. Your kibana UI when making the POST request is not sending the Authorization headers to your Nginx. So nginx is rejecting the call and not sending it to Kibana. When you use the url directly, it works because there is no auth needed – Tarun Lalwani Sep 08 '17 at 18:00
  • This also happens when not using basic auth at all. – Sebastian Grebe Sep 08 '17 at 18:20
  • Next culprit could be cookies. Add `proxy_cookie_domain localhost $host`; – Tarun Lalwani Sep 08 '17 at 18:28
  • This did not help either.Just to clarify here an image how it looks when KIbana fails to load: https://imgur.com/a/nbvRF – Sebastian Grebe Sep 08 '17 at 18:36
  • Can you debug using http://tarunlalwani.com/post/how-to-debug-nginx-reverse-proxy-issues-php-fpm-gunicorn-uwsgi/ ? And see what difference happens between the two api calls? – Tarun Lalwani Sep 08 '17 at 18:50
  • I haven't found anything while going through your post, sorry. – Sebastian Grebe Sep 08 '17 at 19:08
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/153981/discussion-between-tarun-lalwani-and-sebi55). – Tarun Lalwani Sep 08 '17 at 19:09

0 Answers0