2487dbfafa
* 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 <Proxy> section. Change-Id: I0bb11b72eec9e8753ed8cf1d5324f411bb574f49
32 lines
1.6 KiB
Plaintext
32 lines
1.6 KiB
Plaintext
<VirtualHost <%= scope.lookupvar("::logstash::web::vhost_name") %>:80>
|
|
ServerName <%= scope.lookupvar("::logstash::web::vhost_name") %>
|
|
ServerAdmin <%= scope.lookupvar("::logstash::web::serveradmin") %>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-error.log
|
|
|
|
LogLevel warn
|
|
|
|
CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-access.log combined
|
|
|
|
<IfModule mod_proxy.c>
|
|
<% if proxy_elasticsearch == true %>
|
|
# Proxy GETs for elasticsearch _aliases, .*/_status, .*/_search,
|
|
# .*/_mapping, _cluster/health, and _nodes.
|
|
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]
|
|
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 %>
|
|
|
|
ProxyPass / http://127.0.0.1:5601/ retry=0
|
|
ProxyPassReverse / http://127.0.0.1:5601/
|
|
</IfModule>
|
|
</VirtualHost>
|