6.5.0 NGINX reverse proxy not working anymore

Hi,

Seems 6.5.0 broke my NGINX reverse proxy?

sites-available/kibana

server {
        listen 80 default_server;
        listen [::]:80 default_server;

         server_name 192.168.0.115 (kibana and nginx running on same server) ;

    location /kibana/ {
        proxy_pass http://localhost:5601/;
    }
}

kibana.yml

server.port: 5601
server.host: "localhost"
server.basePath: "/kibana"
elasticsearch.username: "user"
elasticsearch.password: "pass"
xpack.security.enabled: true
elasticsearch.url: "elasticcloud"

The same was working fine under 6.4.2.

I gave a quick try and reproducing this on localhost and didn't have any luck. The configs look fine though. Can you share what errors you're getting?

I get the default NGINX welcome page, which is kinda of strange. Same happens when I try another port than 80.

I'm far from an NGINX expert so I'm a bit at a loss. Don't see any errors in the logs either.

I don't know why but reverse proxies now only work if you don't set the base path.

Nginx:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

#    root /var/www/example.com/html;
#    index index.html index.htm;

    server_name my-server-ip;

location / {
#        rewrite /kibana/(.*) /$1 break;
        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;
    }
}

Kibana.yml

server.port: 5601
server.host: "localhost"
server.basePath: "/kibana"
kibana.defaultAppId: "dashboard"
elasticsearch.username: "user"
elasticsearch.password: "pass"
xpack.security.enabled: true
elasticsearch.url: "https://elasticsearch"

1 Like

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