Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
deleted 60 characters in body
Source Link
NarūnasK
  • 408
  • 7
  • 19

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location ~ ^/october/.*$ { proxy_pass http://10.10.0.3:5601/; # --------- Note the added slash ------------^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; } } 

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location /october/ { proxy_pass http://10.10.0.3:5601/; # --------- Note the added slash ------------^ 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; } } 

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location ~ ^/october.*$ { proxy_pass http://10.10.0.3: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; } } 
added 65 characters in body
Source Link
NarūnasK
  • 408
  • 7
  • 19

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location /october/ { proxy_pass http://10.10.0.3:5601;5601/; # --------- Note the added slash ------------^ 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; } } 

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location /october/ { proxy_pass http://10.10.0.3: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; } } 

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location /october/ { proxy_pass http://10.10.0.3:5601/; # --------- Note the added slash ------------^ 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; } } 
Source Link
NarūnasK
  • 408
  • 7
  • 19

I think you have had your locations nested incorrectly, please try the following:

server { listen 443 ; ssl on; ssl_certificate /etc/letsencrypt/live/my.domain.io/cert.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain.io/privkey.pem; server_name my.domain.io; access_log /var/log/nginx/kibana.access.log; error_log /var/log/nginx/kibana.error.log; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; location / { proxy_pass http://localhost: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; } location /october/ { proxy_pass http://10.10.0.3: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; } }