Merge "Fix ElasticSearch reverse proxy settings."

This commit is contained in:
Jenkins 2013-10-17 17:48:42 +00:00 committed by Gerrit Code Review
commit 21380b22b1

View File

@ -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]
<Proxy http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/>
ProxySet connectiontimeout=15 timeout=120
</Proxy>
ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/
<% end %>