Added apache modules
This commit is contained in:
parent
b280208ee9
commit
ff6b42fc09
3 changed files with 239 additions and 17 deletions
|
@ -310,18 +310,86 @@ class apache::mod::auth_kerb {
|
|||
}
|
||||
|
||||
|
||||
# Install mod_authnz_ldap.
|
||||
#
|
||||
class apache::mod::authnz_ldap {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "authnz_ldap": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_fcgid.
|
||||
#
|
||||
class apache::mod::fcgid {
|
||||
|
||||
package { "mod_fcgid":
|
||||
name => $operatingsystem ? {
|
||||
debian => "libapache2-mod-fcgid",
|
||||
ubuntu => "libapache2-mod-fcgid",
|
||||
default => "mod_fcgid",
|
||||
},
|
||||
ensure => installed,
|
||||
require => Package["httpd"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "fcgid":
|
||||
require => Package ["libapache2-mod-fcgid"],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "fcgid.conf":
|
||||
require => Package["mod_fcgid"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_headers.
|
||||
#
|
||||
class apache::mod::headers {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "headers": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_ldap.
|
||||
#
|
||||
class apache::mod::ldap {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "ldap": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -331,13 +399,30 @@ class apache::mod::fcgid {
|
|||
class apache::mod::perl {
|
||||
|
||||
package { "mod_perl":
|
||||
name => $operatingsystem ? {
|
||||
debian => "libapache2-mod-perl2",
|
||||
ubuntu => "libapache2-mod-perl2",
|
||||
default => "mod_perl",
|
||||
},
|
||||
ensure => installed,
|
||||
require => Package["httpd"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "perl2":
|
||||
require => Package ["libapache2-mod-perl2"],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "perl.conf":
|
||||
require => Package["mod_perl"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -347,13 +432,87 @@ class apache::mod::perl {
|
|||
class apache::mod::php {
|
||||
|
||||
package { "php":
|
||||
name => $operatingsystem ? {
|
||||
debian => "libapache2-mod-php5",
|
||||
ubuntu => "libapache2-mod-php5",
|
||||
default => "php",
|
||||
},
|
||||
ensure => installed,
|
||||
require => Package["httpd"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "php5":
|
||||
require => Package ["libapache2-mod-php5"],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "php.conf":
|
||||
require => Package["php"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_proxy
|
||||
#
|
||||
class apache::mod::proxy {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "proxy":
|
||||
content => template("apache/proxy.conf.erb"),
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "proxy.conf":
|
||||
content => template("apache/proxy.conf.erb"),
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_proxy_http
|
||||
#
|
||||
class apache::mod::proxy_http {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "proxy_http": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_proxy_balancer
|
||||
#
|
||||
class apache::mod::proxy_balancer {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "proxy_balancer": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -363,13 +522,47 @@ class apache::mod::php {
|
|||
class apache::mod::python {
|
||||
|
||||
package { "mod_python":
|
||||
name => $operatingsystem ? {
|
||||
debian => "libapache2-mod-python",
|
||||
ubuntu => "libapache2-mod-python",
|
||||
default => "mod_python",
|
||||
},
|
||||
ensure => installed,
|
||||
require => Package["httpd"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "python":
|
||||
require => Package ["libapache2-mod-python"],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "python.conf":
|
||||
require => Package["mod_python"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install mod_rewrite.
|
||||
#
|
||||
class apache::mod::rewrite {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "rewrite": }
|
||||
}
|
||||
centos,fedora: { }
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -379,13 +572,30 @@ class apache::mod::python {
|
|||
class apache::mod::wsgi {
|
||||
|
||||
package { "mod_wsgi":
|
||||
name => $operatingsystem ? {
|
||||
debian => "libapache2-mod-wsgi",
|
||||
ubuntu => "libapache2-mod-wsgi",
|
||||
default => "mod_wsgi",
|
||||
},
|
||||
ensure => installed,
|
||||
require => Package["httpd"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "wsgi":
|
||||
require => Package ["libapache2-mod-wsgi"],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
apache::configfile { "wsgi.conf":
|
||||
require => Package["mod_wsgi"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Apache module not supported in ${operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
12
apache/templates/proxy.conf.erb
Normal file
12
apache/templates/proxy.conf.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<% if has_variable?("apache_proxy_allow") -%>
|
||||
ProxyRequests On
|
||||
ProxyVia On
|
||||
|
||||
<Proxy *>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from <%= apache_proxy_allow %>
|
||||
</Proxy>
|
||||
<% else -%>
|
||||
ProxyRequests Off
|
||||
<% end -%>
|
|
@ -187,10 +187,10 @@ class puppet::server inherits puppet::client {
|
|||
}
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::a2enmod { "headers": }
|
||||
apache::debian::a2enmod { "proxy": }
|
||||
apache::debian::a2enmod { "proxy_http": }
|
||||
apache::debian::a2enmod { "proxy_balancer": }
|
||||
include apache::mod::headers
|
||||
include apache::mod::proxy
|
||||
include apache::mod::proxy_http
|
||||
include apache::mod::proxy_balancer
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue