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
This commit is contained in:
Yolanda Robla 2015-10-09 12:08:04 +02:00
parent c9a9d607c2
commit 3ed819160d
2 changed files with 13 additions and 3 deletions

View File

@ -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,
}

View File

@ -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.
<Directory /etc/graphite/>
Order deny,allow
Allow from all
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
</Directory>
</VirtualHost>