aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/apache/manifests/base.pp10
-rw-r--r--modules/apache/manifests/cve-2011-3192.pp3
-rw-r--r--modules/apache/manifests/mod/php.pp2
-rw-r--r--modules/apache/manifests/mod/ssl.pp2
-rw-r--r--modules/apache/manifests/mod/wsgi.pp2
-rw-r--r--modules/puppet/manifests/thin.pp3
6 files changed, 14 insertions, 8 deletions
diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp
index 18c9a8bf..d56e9100 100644
--- a/modules/apache/manifests/base.pp
+++ b/modules/apache/manifests/base.pp
@@ -11,9 +11,13 @@ class apache::base {
alias => 'apache-server',
}
- # only needed on mga1 and mga2
- if ($::lsbdistrelease == '1') or ($::lsbdistrelease == '2') {
+ if versioncmp($::lsbdistrelease, '2') <= 0 {
+ $conf_d = '/etc/httpd/conf.d'
+
+ # only needed on mga1 and mga2
package { $apache::var::pkg_conf: }
+ } else {
+ $conf_d = '/etc/httpd/conf/conf.d'
}
service { 'httpd':
@@ -27,7 +31,7 @@ class apache::base {
}
apache::config {
- '/etc/httpd/conf.d/customization.conf':
+ "${conf_d}/customization.conf":
content => template('apache/customization.conf'),
require => Package[$apache::var::pkg_conf];
'/etc/httpd/conf/vhosts.d/00_default_vhosts.conf':
diff --git a/modules/apache/manifests/cve-2011-3192.pp b/modules/apache/manifests/cve-2011-3192.pp
index c0f1c651..0ec3dcd3 100644
--- a/modules/apache/manifests/cve-2011-3192.pp
+++ b/modules/apache/manifests/cve-2011-3192.pp
@@ -1,8 +1,9 @@
class apache::cve-2011-3192 {
+ include apache::base
# temporary protection against CVE-2011-3192
# http://httpd.apache.org/security/CVE-2011-3192.txt
apache::config {
- '/etc/httpd/conf.d/CVE-2011-3192.conf':
+ "${apache::base::conf_d}/CVE-2011-3192.conf":
content => template('apache/CVE-2011-3192.conf'),
}
}
diff --git a/modules/apache/manifests/mod/php.pp b/modules/apache/manifests/mod/php.pp
index c5de893e..2c8d6733 100644
--- a/modules/apache/manifests/mod/php.pp
+++ b/modules/apache/manifests/mod/php.pp
@@ -4,7 +4,7 @@ class apache::mod::php {
package { 'apache-mod_php': }
- apache::config { '/etc/httpd/conf.d/mod_php.conf':
+ apache::config { "${apache::base::conf_d}/mod_php.conf":
content => template('apache/mod/php.conf'),
}
}
diff --git a/modules/apache/manifests/mod/ssl.pp b/modules/apache/manifests/mod/ssl.pp
index 9065c5cc..ab3d24e4 100644
--- a/modules/apache/manifests/mod/ssl.pp
+++ b/modules/apache/manifests/mod/ssl.pp
@@ -14,7 +14,7 @@ class apache::mod::ssl {
apache::config {
'/etc/httpd/conf/vhosts.d/01_default_ssl_vhost.conf':
content => template('apache/01_default_ssl_vhost.conf');
- '/etc/httpd/conf.d/ssl_vhost.conf':
+ "${apache::base::conf_d}/ssl_vhost.conf":
content => template('apache/mod/ssl_vhost.conf');
}
}
diff --git a/modules/apache/manifests/mod/wsgi.pp b/modules/apache/manifests/mod/wsgi.pp
index d2ab72d2..7f4fb719 100644
--- a/modules/apache/manifests/mod/wsgi.pp
+++ b/modules/apache/manifests/mod/wsgi.pp
@@ -6,7 +6,7 @@ class apache::mod::wsgi {
ensure => directory,
}
- apache::config { '/etc/httpd/conf.d/mod_wsgi.conf':
+ apache::config { "${apache::base::conf_d}/mod_wsgi.conf":
content => template('apache/mod/wsgi.conf'),
}
}
diff --git a/modules/puppet/manifests/thin.pp b/modules/puppet/manifests/thin.pp
index 0c6259e4..1ca03a7e 100644
--- a/modules/puppet/manifests/thin.pp
+++ b/modules/puppet/manifests/thin.pp
@@ -1,6 +1,7 @@
class puppet::thin {
package { 'ruby-thin': }
+ include apache::base
include apache::mod::ssl
include apache::mod::proxy
@@ -8,7 +9,7 @@ class puppet::thin {
vhost_file => 'puppet/apache_proxy_vhost.conf',
}
- apache::config { '/etc/httpd/conf.d/puppet.conf':
+ apache::config { "${apache::base::conf_d}/puppet.conf":
content => 'Listen 8140',
}