Apache – Kibana 5.0 apache proxy and reverse-proxy configuration fails

apachekibana-5PROXYreverse-proxy

I'm trying to set a basic reverse proxy to access my kibana instance.
Here the kibana instance (working directly through :5601 without any problem)

#server.basePath: ""
server.basePath:"/kibana"

And my apache stuff

<VirtualHost *:80>
    Servername xxxx
    ProxyPreserveHost On
    ProxyRequests On
    ProxyPass / http://localhost:5601
    ProxyPassReverse / http://localhost:5601
</VirtualHost>

The problem is I get
http://xxxx/

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /app/kibana.

Reason: DNS lookup failure for: localhost:5601app

I did some test but nothing seems to work.
Second try with
ProxyPass / http://localhost:5601/app/kibana
ProxyPassReverse / http://localhost:5601/app/kibana

This time it's better but still not OK
http://xxxx
I get a blink where I can see 'kibana is loading' and right after a big red message

Kibana did not load properly. Check the server output for more
information.

Best Answer

OK, that was easy ... The apache conf is (beware of the slashes)

<VirtualHost *:80>
    Servername xxxx
    ProxyPreserveHost On
    ProxyRequests On
    ProxyPass / http://localhost:5601/
    ProxyPassReverse / http://localhost:5601/
</VirtualHost>

And I let all by default on Kibana (no base.path)

Related Topic