Kibana behind apache reverse proxy Can't Access Index Patterns

Hello,

im using kibana behind apache reverse proxy and i can' use "Dev Tools" to request all of my Elasticsearch indexs , but when i come to the "Maanagment -> index Patterns" Section , Kibana can't find my Elasticsearch indexs and i got the following error :

in my kibana.yml file i set : server.host: 0.0.0.0
same value in elasticsearch.yml : server.host: 0.0.0.0
in my apache i have the following configuration :

ProxyRequests On

ProxyPass /elastic http://127.0.0.1:9200
ProxyPassReverse /elastic http://127.0.0.1:9200

ProxyPass /elasticsearch http://127.0.0.1:5601/elasticsearch
ProxyPassReverse /elasticsearch http://127.0.0.1:5601/elasticsearch

ProxyPass /elasticsearch/*/_search http://127.0.0.1:5601/elasticsearch/*/_search
ProxyPassReverse /elasticsearch/*/_search http://127.0.0.1:5601/elasticsearch/*/_search

ProxyPass /app/kibana#/management/kibana/indices http://127.0.0.1:5601/app/kibana#/management/kibana/indices
ProxyPassReverse /app/kibana#/management/kibana/indices http://127.0.0.1:5601/app/kibana#/management/kibana/indices

ProxyPass /kibana http://127.0.0.1:5601
ProxyPassReverse /kibana http://127.0.0.1:5601

ProxyPass /app/kibana http://127.0.0.1:5601/app/kibana
ProxyPassReverse /app/kibana http://127.0.0.1:5601/app/kibana

ProxyPass /app/timelion http://127.0.0.1:5601/app/timelion
ProxyPassReverse /app/timelion http://127.0.0.1:5601/app/timelion

ProxyPass /bundles http://127.0.0.1:5601/bundles
ProxyPassReverse /bundles http://127.0.0.1:5601/bundles

ProxyPass /plugins http://127.0.0.1:5601/plugins
ProxyPassReverse /plugins http://127.0.0.1:5601/plugins

ProxyPass /api http://127.0.0.1:5601/api
ProxyPassReverse /api http://127.0.0.1:5601/api

ProxyPass /ui http://127.0.0.1:5601/ui
ProxyPassReverse /ui http://127.0.0.1:5601/ui

please do you have any idea why kibana can't access to my elasticsearch index

Regards !

1 Like

Hi, that request should usually return a 200 OK and not a 302 Found. I think the wizard will just not follow to the new URL. Could you please show the response headers of that request that you highlighted, specifically the Location header, which should show to what URL it's trying to forward you.

WIthout being too deep into Apache reverse proxy configurations, it also looks rather overcomplicated the above config? Can't you just forward everything under /elastic to the ES instance, and just forward everything else to Kibana?

Hello,
thanks you for your response this the location header it contains an https url :

Regards !

Hi,

that forward or error is not coming from anything inside Elasticsearch or Kibana. Giving this a quick look it seems that kind of URL and error codes is coming in case you're using something like CA Single Sign-On. Maybe contacting your company's network department might be the best help there.

Cheers,
Tim

Hello @timeroes ,

thank you so much for your time, yes you are right after a while investigation i find out that the server administrator block any request that contains * in the url , so when i click on "index Pattern" Kibana call the folowing url www.mydomain.com/elasticsearch/*/_search to get the list of all index in my elasticsearch.

so my question is there is any way to modify the kibana source code to adjust or removre the * from the url and keep the url working ?

Best Regards !

Hi Ali,

I think it might be easier to add an exception rule for your elasticsearch domain as multiple Kibana plugins might use a wildcard (*) when making requests to ES.

Cheers

Hello @sebastien
thank you for your time can you please give me more explantation about adding exception rule in elasticsearch where and how to add it (which config file...)

Best Regards .

Hi Ali,

Sorry about the confusion. I meant that it seemed to me that it was easier if your server administrator added a rule to allow *in the urls just on the Elasticsearch node instance.

Cheers.

ok thank your for the proposition.

Regards.

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