Puppet module to add kibana functionality
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dual-elasticsearch.vhost.erb 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <VirtualHost *:80>
  2. ServerName <%= @vhost_name %>
  3. ServerAdmin <%= @serveradmin %>
  4. <% if @serveraliases.is_a? Array %>
  5. <% serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
  6. <% elsif @serveraliases != '' %>
  7. <%= " ServerAlias #{serveraliases}" %>
  8. <% end %>
  9. ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log
  10. LogLevel warn
  11. CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
  12. <IfModule mod_proxy.c>
  13. # Proxy GETs for elasticsearch .*/_aliases, .*/_status, .*/_search,
  14. # .*/_mapping, .*/_mapping/field/.*, _cluster/health, _cluster/state/.*,
  15. # _nodes. and _nodes/stats
  16. # These GETs allow read-only access for kibana3, elasticsearch-head, and bigdesk,
  17. # as well as arbitrary searches using the elasticsearch search api.
  18. RewriteEngine on
  19. RewriteCond %{REQUEST_METHOD} GET
  20. RewriteRule ^<%= @elasticsearch_prefix %>((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping(/field(/.*)?)?|_cluster/(health|state(/.*)?)|_nodes(/stats)?)$ <%= @elasticsearch_url %>/$1 [P]
  21. RewriteCond %{REQUEST_METHOD} POST
  22. RewriteRule ^<%= @elasticsearch_prefix %>(_aliases|(.*/)?_search)$ <%= @elasticsearch_url %>/$1 [P]
  23. RewriteCond %{REQUEST_METHOD} OPTIONS
  24. RewriteRule ^<%= @elasticsearch_prefix %>((.*/)?_search)$ <%= @elasticsearch_url %>/$1 [P]
  25. <Proxy <%= @elasticsearch_url %>/>
  26. ProxySet connectiontimeout=<%= @vhost_proxy_connect_timeout %> timeout=<%= @vhost_proxy_timeout %>
  27. </Proxy>
  28. ProxyPassReverse <%= @elasticsearch_prefix %> <%= @elasticsearch_url %>/
  29. </IfModule>
  30. DocumentRoot <%= docroot %>
  31. <Directory <%= docroot %>>
  32. Options -Multiviews
  33. </Directory>
  34. </VirtualHost>