From 2487dbfafa8f3b1ea43e51ce851801f0cc4715ac Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 16 Oct 2013 15:35:38 -0700 Subject: [PATCH] Fix ElasticSearch reverse proxy settings. * modules/logstash/templates/kibana.vhost.erb: Need to allow POST to _aliases and _search and OPTIONS to _search. Also fix the ProxySet settings directive by placing it in a section. Change-Id: I0bb11b72eec9e8753ed8cf1d5324f411bb574f49 --- modules/logstash/templates/kibana.vhost.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/logstash/templates/kibana.vhost.erb b/modules/logstash/templates/kibana.vhost.erb index c2eebdb9d3..be608ce892 100644 --- a/modules/logstash/templates/kibana.vhost.erb +++ b/modules/logstash/templates/kibana.vhost.erb @@ -15,7 +15,13 @@ RewriteEngine on RewriteCond %{REQUEST_METHOD} GET RewriteRule ^/elasticsearch/(_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping|_cluster/health|_nodes)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] - ProxySet http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/ connectiontimeout=15 timeout=120 + RewriteCond %{REQUEST_METHOD} POST + RewriteRule ^/elasticsearch/(_aliases|(.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] + RewriteCond %{REQUEST_METHOD} OPTIONS + RewriteRule ^/elasticsearch/((.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] + /> + ProxySet connectiontimeout=15 timeout=120 + ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/ <% end %>