# Kibana index patterns couldn't find any Elasticsearch data when server.basePath is set

**URL:** <https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214>\
**Category:** Kibana\
**Created:** [January 26, 2021, 9:48am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214 "2021-01-26T09:48:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordanpantin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordanpantin/32/82909_2.png) [@jordanpantin](https://discuss.elastic.co/u/jordanpantin)\
**Post date:** [January 26, 2021, 9:48am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/1 "2021-01-26T09:48:20Z")

</div>

I have installed ElasticSearch and Kibana (v 7.9.3) on a windows server.

ElasticSearch is available on port 9200.

I use reverse proxy on IIS for access to Kibana from outside. So I specified the server.basePath in configuration file (server.basePah: "/kibana" and server.host: "0.0.0.0"). So I can get Kibana from outside with "myServerUrl/kibana"

But when I want to create a new index pattern, kibana couldn't find any Elasticsearch data. Even if I have many index with docs. I can see all index in Index Management tab or by query "\_cat/indices?v"

When I try to create new index pattern on localhost:5601 (by remove server.path) Kibana can find all index pattern available.

Why Kibana doesn't find any ElasticSearch data when I use server.basePath but can find data on localhost ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 26, 2021, 9:59am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/2 "2021-01-26T09:59:09Z")

</div>

Can you show your IIS reverse proxy configuration? It's easy to make a mistake in there and some requests won't get passed through correctly

---

<div class="post-metadata">

**Author:** ![jordanpantin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordanpantin/32/82909_2.png) [@jordanpantin](https://discuss.elastic.co/u/jordanpantin)\
**Post date:** [January 26, 2021, 10:04am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/3 "2021-01-26T10:04:53Z")

</div>

Here is the web.config file :

```auto
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://127.0.0.1:5601/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

```

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 26, 2021, 3:09pm UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/4 "2021-01-26T15:09:24Z")

</div>

Please check out this blog article - It seems like it's related to your case and there's some additional config necessary: [https://www.smbadmin.com/2017/07/securing-kibana-with-iis-reverse-proxy.html](https://www.smbadmin.com/2017/07/securing-kibana-with-iis-reverse-proxy.html)

---

<div class="post-metadata">

**Author:** ![jordanpantin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordanpantin/32/82909_2.png) [@jordanpantin](https://discuss.elastic.co/u/jordanpantin)\
**Post date:** [February 4, 2021, 9:30am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/5 "2021-02-04T09:30:10Z")

</div>

I set up the part on "Configure the IIS Reverse Proxy".

Kibana still couldn't find any Elasticsearch data. I tried with the basePath set (port 80 with url like "severname/kibana" that redirect to 5601) and without basePath set (with a new website on IIS host on 5600 that redirect to 5601).

In both cases the redirection still seems to blocked when I want to add an index from Kibana.

The new web.config file :

```auto
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://localhost:5601/{R:1}" />
                    <serverVariables>
                        <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                    </serverVariables>
                </rule>
            </rules>
            <outboundRules>
                <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
                    <match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:5601/(.*)" />
                    <action type="Rewrite" value="http{R:1}://servername.fr/kibana/{R:2}" />
                </rule>
                <rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
                    <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
                    <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
                </rule>
                <preConditions>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                    <preCondition name="NeedsRestoringAcceptEncoding">
                        <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
                    </preCondition>
                </preConditions>
            </outboundRules>
        </rewrite>
    </system.webServer>
</configuration>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 4, 2021, 9:30am UTC](https://discuss.elastic.co/t/kibana-index-patterns-couldnt-find-any-elasticsearch-data-when-server-basepath-is-set/262214/6 "2021-03-04T09:30:41Z")

</div>

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