Elastic Search Behind Apache Reverse Proxy But Kibana Faces Problems Accessing ES

I know this is a year old thread.. but I ended up here trying to find rules for getting elasticsearch and kibana to be virtuals behind apache. The config here helped, and I was able to figure it out ( so far anyway ). You're on the right track, but you have to alias it to elasticsearch, not es, for kibana to work correctly. There are calls out to an elasticsearch url in the logs. Not sure why yet, probably some n00b error on my part with a setting. After that, I had to create aliases for app ( for kibana and sense ) and bundles ( for the url kibana uses to get its guts ). Here's what I ended up with ( ProxyHTMLURLMap didn't work on my apache install.. so I left it of. Still works ).
I'd be happy to hear I'm still doing this wrong, and it's all easier than this. Not secure now, but I'm just trying to get it up and running to test it out.

Rewrite URL that starts and ends with /elasticsearch. Redirect it to /elasticsearch/

RewriteEngine On
RewriteRule "^/elasticsearch/elasticsearch/" "/elasticsearch/" [R]
RewriteRule "^/elasticsearch$" "/elasticssearch/" [R]

RewriteRule "^/app/kibana/" "/app/" [R]
RewriteRule "^/app$" "/app/" [R]

RewriteRule "^/bundles/bundles/" "/bundles/" [R]
RewriteRule "^/bundles$" "/bundles/" [R]

Set Standard (Forward) Proxy Off ...

ProxyRequests off
ProxyPreserveHost On

<Location /elasticsearch/ >
Options All
Order deny,allow
Allow from all

Define the actual proxy mapping and redirection

LogLevel debug
ProxyPass http://localhost:9200/ retry=0 timeout=5
ProxyPassReverse http://localhost:9200/
ProxyPassReverseCookiePath / /elasticsearch/

<Location /app/ >
Options All
Order deny,allow
Allow from all

LogLevel debug
ProxyPass http://localhost:5601/app/ retry=0 timeout=5
ProxyPassReverse http://localhost:5601/app/
ProxyPassReverseCookiePath / /app/

<Location /bundles/ >
Options All
Order deny,allow
Allow from all

LogLevel debug
ProxyPass http://localhost:5601/bundles/ retry=0 timeout=5
ProxyPassReverse http://localhost:5601/bundles/
ProxyPassReverseCookiePath / /app/