Search code examples
apachereverse-proxykibana-4

Kibana proxy pass not working


i'm taring to configure a revers Apache proxy for Kibana ES in AWS to be able to limit access via google oauth. current setup: kibana.exemple.com this configuration works

 <Location />
  AuthType openid-connect
  Require valid-user
 ProxyPass http://kibana.aws.xxxxxxxxxxxxxxxx/
 ProxyPassReverse http://kibana.aws.xxxxxxxxxxxxxxxx/
 </Location>

but ineed to put kibana in /aws/ location in the same vhost

<Location /aws/>
 AuthType openid-connect
 Require valid-user
 ProxyPass http://kibana.aws.xxxxxxxxxxxxxxxx/
 ProxyPassReverse http://kibana.aws.xxxxxxxxxxxxxxxx/
 </Location>

and access http://kibana.exemple.com/aws/_plugin/kibana/

kibana will fail loading and get error :(

Error: Not Found at respond (http://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:85132:15) at checkRespForFailure (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:85100:7) at htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:83738:7 at wrappedErrback (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:20902:78) at wrappedErrback (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:20902:78) at wrappedErrback (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:20902:78) at htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:21035:76 at Scope.$eval (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:22022:28) at Scope.$digest (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:21834:31) at Scope.$apply (htt://kibana.exemple.com/_plugin/kibana/index.js?_b=6103:22126:24)

removed p from http to be able to post.

will apprise any input on this on this

Thanks.


Solution

  • so i manage to solve the problem:

    <LocationMatch "(/_plugin/kibana/|/_nodes|/.kibana4|/nginx|logstash-)(.*)">
                    ProxyPass http://kibana.aws.xxxxxxxxxxxxxxxx/$1$2
                    ProxyPassReverse http://kibana.aws.xxxxxxxxxxxxxxxx/$1$2
             </LocationMatch>