Kibana authentication using X-pack fails when running behind nginx proxy

(Parth Mehta) #1

I am using nginx to serve as a proxy for my kibana. But kibana is unable to communicate with elasticsearch when accessing through nginx. This issue occurs only using Xpack for authentication.

For example if kibana is running at, I can access it using this address directy and everything works just fine.

Now I want to map to this ip using nginx. In this case, I am still able to get to kibana's login page, using the new URL but all login attempts fail.

I tried using access logs in elastic search, but seems like kibana logins are not included in the access logs, only GET, PUT or DELETE requests are logged.

(Matt Bargar) #2

What error are you seeing in Kibana when you attempt to login? What does the request and response look like in your browser's dev tools network tab? Is Nginx possibly stripping out any headers (cookies, authentication, etc.) or request params? You should definitely see an authentication exception in your ES logs when a kibana login fails, so it sounds like the requests aren't even reaching elasticsearch.

(Parth Mehta) #3

Thanks for the suggestion @bargs
The dev tool helped. It turned out to be a redirect issue.

Initially would redirect to

Setting basepath as "/kibana" in kibana config file solved it.

(system) #4

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