Kibana and Nginx

hi,

i can't proxy my kibana server.
my config is

	location  /kibana {
		rewrite ^/kibana/?(.*)$ /$1 break;
		proxy_pass http://app-v:5601;
	}

and when i enter http://router/kibana i get

Not Found
The requested URL /app/kibana was not found on this server.

removing rewrite and i get

{"statusCode":404,"error":"Not Found"}

any help is really appreciated!

I wouldn't expect the rewrite line to have to be there. I'd fire up the browser's debugging console to find out which URL is getting a 404. You may have to add a slash to both URLs, i.e. do this:

location  /kibana/ {
        proxy_pass http://app-v:5601/;
}

browser debug:
http://app-v:5601/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)

no matter what i do, either with or without "/", it sends me to /app/kibana or 404.

location /kibana/ {
proxy_pass http://app-v:5601/;
}

results in:

Not Found
The requested URL /app/kibana was not found on this server.

browser debug:
http://app-v:5601/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)

Okay, but that's harmless and nothing you should pay attention to.

Not sure what's up with the rest.

My Nginx config for kibana interface. Hope it helps.

server {
listen 80;

server_name kibana.interface;

auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;

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;        
}
}

This is for location "/", which works for me too.
I'm talking about location "/kibana"

I'm having the same problems, trying to run kibana on /kibana.

Do you have a Nginx configuration file to do this?

Is there a clear answer to this problem or is this still a mistery since october last year?

@DocMAX @florissmit10 did you manage to make this work?

I too want to make kibana run on /kibana (or anything else except "/")!

Here with exactly the same issue!