diff --git a/templates/kibana.vhost.erb b/templates/kibana.vhost.erb index 786f358..8648f74 100644 --- a/templates/kibana.vhost.erb +++ b/templates/kibana.vhost.erb @@ -1,12 +1,12 @@ - ServerName <%= scope.lookupvar("::logstash::web::vhost_name") %> - ServerAdmin <%= scope.lookupvar("::logstash::web::serveradmin") %> + ServerName <%= @vhost_name %> + ServerAdmin <%= @serveradmin %> - ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-error.log + ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log LogLevel warn - CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-access.log combined + CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined <% if @proxy_elasticsearch == true %> @@ -14,15 +14,15 @@ # .*/_mapping, .*/_mapping/field/.*, _cluster/health, and _nodes. RewriteEngine on RewriteCond %{REQUEST_METHOD} GET - RewriteRule ^/elasticsearch/((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping|(.*/)?_mapping/field/(.*)?|_cluster/health|_nodes)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] + RewriteRule ^/elasticsearch/((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping|(.*/)?_mapping/field/(.*)?|_cluster/health|_nodes)$ http://<%= @discover_nodes[0] %>/$1 [P] RewriteCond %{REQUEST_METHOD} POST - RewriteRule ^/elasticsearch/(_aliases|(.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] + RewriteRule ^/elasticsearch/(_aliases|(.*/)?_search)$ http://<%= @discover_nodes[0] %>/$1 [P] RewriteCond %{REQUEST_METHOD} OPTIONS - RewriteRule ^/elasticsearch/((.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] - /> + RewriteRule ^/elasticsearch/((.*/)?_search)$ http://<%= @discover_nodes[0] %>/$1 [P] + /> ProxySet connectiontimeout=15 timeout=120 - ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/ + ProxyPassReverse /elasticsearch/ http://<%= @discover_nodes[0] %>/ <% end %> ProxyPass / http://127.0.0.1:5601/ retry=0