From 0a62118c0ec1eb825dbf1b2c011a3105f6778d7d Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 26 May 2016 15:15:42 -0700 Subject: [PATCH] Support Apache 2.4 ACLs We need to use Require all granted in our directory that hosts the Kibana files otherwise we get 403 forbidden when trying to access the content. Change-Id: I2e14ba113705f3fabaa4920704589da0f9abe978 --- manifests/js.pp | 6 ++++++ templates/dual-elasticsearch.vhost.erb | 3 +++ 2 files changed, 9 insertions(+) diff --git a/manifests/js.pp b/manifests/js.pp index da7efb2..49b445c 100644 --- a/manifests/js.pp +++ b/manifests/js.pp @@ -76,6 +76,12 @@ class kibana::js ( } } + # The Apache mod_version module only needs to be enabled on Ubuntu 12.04 + # as it comes compiled and enabled by default on newer OS, including CentOS + if !defined(Httpd::Mod['version']) and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04' { + httpd::mod { 'version': ensure => present } + } + httpd::vhost { 'kibana': docroot => "${base_path}/src", vhost_name => $vhost_name, diff --git a/templates/dual-elasticsearch.vhost.erb b/templates/dual-elasticsearch.vhost.erb index 78b3394..3f6ef0a 100644 --- a/templates/dual-elasticsearch.vhost.erb +++ b/templates/dual-elasticsearch.vhost.erb @@ -35,6 +35,9 @@ DocumentRoot <%= docroot %> > Options -Multiviews + = 2.4> + Require all granted +