Skip to content

Instantly share code, notes, and snippets.

@pedroagabreu
Last active August 29, 2015 14:00
Show Gist options
  • Save pedroagabreu/11008087 to your computer and use it in GitHub Desktop.
Save pedroagabreu/11008087 to your computer and use it in GitHub Desktop.
Hide elasticsearch 1.1.0 behind Apache. Needs mod proxy and proxy_html, and 'elasticsearch: "https://whatever:443"' in Kibana's config.js.
# Set global proxy timeouts
<Proxy http://127.0.0.1:9200>
ProxySet connectiontimeout=5 timeout=90
</Proxy>
# Proxy for _aliases and .*/_search
<LocationMatch "^/(_status|_stats|_nodes|_aliases|.*/_aliases|_search|.*/_search|_mapping|.*/_mapping)$">
ProxyPassMatch http://127.0.0.1:9200/$1
ProxyPassReverse http://127.0.0.1:9200/$1
</LocationMatch>
# Proxy for kibana-int/{dashboard,temp} stuff (if you don't want auth on /, then you will want these to be protected)
<LocationMatch "^/(_\w+/|kibana-int/dashboard/|kibana-int/temp)(.*)$">
ProxyPassMatch http://127.0.0.1:9200/$1$2
ProxyPassReverse http://127.0.0.1:9200/$1$2
</LocationMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment