Latest Kibana proxy under IIS (Windows)

I've been trying to protect Kibana behind a proxy under Windows IIS. I haven't found a solution that works online, so I thought I might ask the experts here.

When I start at localhost:5601, everything works. When I try the proxy, I get the title bar and tabs (discover, visualize, dashboard, settings), but nothing else. There is no content in the main part of the page.

I turned verbose logging on in kibana.yml to see if it would reveal anything. It appears Kibana is making requests to Elasticsearch that are not being answered? As I said, everything works OK using localhost:5601.

respons [12:37:08.192] GET / 200 62ms - 9.0B
respons [12:37:08.317] GET /app/kibana 200 94ms - 9.0B
respons [12:37:08.364] GET /bundles/kibana.style.css?v=9732 200 16ms - 9.0B
respons [12:37:08.380] GET /bundles/commons.style.css?v=9732 200 32ms - 9.0B
respons [12:37:08.567] GET /bundles/commons.bundle.js?v=9732 200 219ms - 9.0B
log [12:37:08.692] [debug][plugin] Checking Elasticsearch version
respons [12:37:08.989] GET /bundles/kibana.bundle.js?v=9732 200 344ms - 9.0B
respons [12:37:09.599] GET /bundles/node_modules/font-awesome/fonts/fontawesome-webfont.eot 200 0ms - 9.0B
respons [12:37:09.717] GET /bundles/src/ui/public/images/kibana.svg 200 0ms - 9.0B
respons [12:37:09.754] POST /elasticsearch/_mget?timeout=0&ignore_unavailable=true&preference=1460489829499 200 5ms - 9.0B
respons [12:37:09.789] POST /elasticsearch/.kibana/index-pattern/_search?fields= 200 0ms - 9.0B
ops [12:37:10.341] memory: 43.8MB uptime: 0:00:22 load: [0.00 0.00 0.00] delay: 2.126
log [12:37:11.231] [debug][plugin] Checking Elasticsearch version
log [12:37:13.755] [debug][plugin] Checking Elasticsearch version
ops [12:37:15.342] memory: 44.1MB uptime: 0:00:27 load: [0.00 0.00 0.00] delay: 1.930

The Kibana and Elasticsearch services are on the same computer (at this point), and I get a response from Elasticsearch using localhost:9200 and 127.0.0.1:9200.

Any help would be appreciated. Thanks!

What URL are you hitting to get at your proxy? Have you tried setting server.port, server.host, and server.basePath in your kibana.yml?

I have not changed server.port or server.host. Any changes I have tried to server.basePath have not worked. For example, using "/app/kibana" resulted in a url of ...com/app/kibana/app/kibana#/...

What is the URL of your proxy?

It's not public, but it's dashboard.testsite.com and points to 127.0.0.1:5601

Any updates here? It's been a couple of days. Thanks...

So, both Kibana and your proxy are running on port 5601 of your localhost?

Not quite... It proxies port 80 in a browser to Kibana on port 5601. I'm trying to put authentication in front of Kibana. From what I've gathered online, it worked on Kibana 3, but there's been some issues with the latest versions of Kibana 4+. I'm hoping it was solved, but I couldn't find it posted anywhere. Thanks again...

Okay, that makes sense. So when you open the developer console, are you seeing any errors? And if so, could you screenshot them or paste them here? Thanks.

No errors that I can see. Using IE11, the Console is empty, and the Debugger only shows the normal html:

Kibana.ui-app-loading {

From Network:
Name Protocol Method Result Content type Received Time Initiator
http://dashboard.testsite.com/bundles/commons.style.css?v=9732 HTTP GET 200 text/css 36.39 KB 24.54 ms parsedElement

I already posted the log output in my first message. From that, it looks like the request is made for the .kibana index, but that's where things stop. Visually, it displays the "please wait while kibana loads" screen, and then it goes to a blank screen. I can't see any error messages anywhere that could point me toward a fix. If there's any additional information I could post that might help, please let me know. Thanks...

Give this a try https://www.ulyaoth.net/resources/tutorial-install-logstash-and-kibana-on-a-windows-server.34/, I was able to use IIS as reverse proxy with some modifications from his guide.

That is the guide I used initially, but it doesn't seem to work for me. When you say "with some modifications", what modifications are you referring to? The only modifications I made was removing some of the other log services, and stripped it down to ELK (Elasticsearch, Logstash, Kibana), I did not use any of the "beats" products.

Follow steps in the section in that guide to install necessary component including creating an IIS site for Kibana, but skip the URL Rewrite Add Rules part,

Here double click on the "Rewrite URL" button the on I added a red box around and then you should see the following window:

Instead, go to IIS > Application Request Routing Cache >, on the right side, click Server Proxy Settings, and configure as in screenshots

This will automatically create URL rewrite rules. The 192.168.1.10:5601 should be server IP and Kibana port. Hope this will work for you.

1 Like

Thanks Anh! After a few tweeks of my own, I got it working. Again, many thanks for your help!!!

Hi all,

I've just started to use the elasticstack and I have also encountered problems when trying to use Kibana and IIS. When I access Kibana through the IIS, the index patterns and indices are all mixed up.

I have tried to follow the steps above to see if my issue can be resolved in a similar way, but I cannot find the option IIS > Application Request Routing Cache >. I am using IIS version 7. I have used the URL Rewrite Add Rules bit though. Where should I find Application Request Routing Cache? Would any of you be able to help me please?

Thanks, I tried this and it worked. But then all pages on my IIS server are redirected to my Kibana instance. Thats not really what I want :slight_smile: I only would like to have a specific site/dnsname redirected. How can one solve that?
Thanks

You can create an IIS website with host header and create URL Rewrite rule at the site level, not at the IIS top level like the previous guide. There's no need to configure ARR at the IIS top level.