From 3ed819160d8e966b18a00d31f725514148aa5499 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Fri, 9 Oct 2015 12:08:04 +0200 Subject: [PATCH] Add support for apache >= 2.4 Graphite is failing for trusty, because of the Require All granted need. Add that to the vhost. Change-Id: I8b0c49929581439a3bce2b04915ee9124ec51acb --- manifests/init.pp | 6 ++++++ templates/graphite.vhost.erb | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index a1432d7..448b2b1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -33,6 +33,12 @@ class graphite( include ::httpd::mod::wsgi + # 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 } + } + package { $packages: ensure => present, } diff --git a/templates/graphite.vhost.erb b/templates/graphite.vhost.erb index 6adc436..84d7baf 100644 --- a/templates/graphite.vhost.erb +++ b/templates/graphite.vhost.erb @@ -53,8 +53,12 @@ # The graphite.wsgi file has to be accessible by apache. It won't # be visible to clients because of the DocumentRoot though. - Order deny,allow - Allow from all + = 2.4> + Require all granted + + + Order deny,allow + Allow from all + -