I had to face issue with NginX reverse_proxy and Kibana. If I make Kibana index - nothing shows until I clear browser cache or visit page from Private Tab in browser. Here is my server.conf (without server {})

include default_proxy_headers;
set $upstream_prod_kibana_registry http://prod_kibana:5601;
resolver ipv6=off valid=10s;
listen 80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name kibana.my.domain;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
location / {
    proxy_buffering off;
    proxy_pass $upstream_prod_kibana_registry;
    proxy_http_version 1.1;
    proxy_set_header Connection "Keep-Alive";
    proxy_set_header Proxy-Connection "Keep-Alive";

But if I visit Kibana's page directly with port http://kibana.my.domain:5601 - everything is here, no need to clear cache. I think it's nginx problem. What should I do?

  • Check HTTP headers returned in both cases: curl -i http://kibana.my.domain:5601/ -o /dev/null and curl -i https://kibana.my.domain/ -o /dev/null. Show both commands output. – Ivan Shatsky Jun 30 at 17:16
  • 1
    I added add_header Cache-Control "no-store, no-cache, must-revalidate"; and this worked for me. – Alex R. Jul 1 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.