Puppet Class: profile::miscweb::httpd
- Defined in:
- modules/profile/manifests/miscweb/httpd.pp
Overview
SPDX-License-Identifier: Apache-2.0 setup a webserver for misc. apps
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'modules/profile/manifests/miscweb/httpd.pp', line 3
class profile::miscweb::httpd (
Stdlib::Fqdn $deployment_server = lookup('deployment_server'),
){
$apache_modules_common = ['rewrite', 'headers', 'proxy', 'proxy_http']
$php_version = wmflib::debian_php_version()
$apache_php_module = "php${php_version}"
$apache_modules = concat($apache_modules_common, $apache_php_module)
ensure_packages('libapache2-mod-php')
class { '::httpd':
modules => $apache_modules,
}
class { '::httpd::mpm':
mpm => 'prefork',
}
httpd::mod_conf { 'authnz_ldap':
ensure => present,
}
profile::auto_restarts::service { 'apache2': }
profile::auto_restarts::service { 'envoyproxy': }
ferm::service { 'miscweb-http-envoy':
proto => 'tcp',
port => '80',
srange => "(${::ipaddress} ${::ipaddress6})"
}
ferm::service { 'miscweb-http-deployment':
proto => 'tcp',
port => '80',
srange => "(@resolve((${deployment_server})) @resolve((${deployment_server}), AAAA))"
}
rsyslog::input::file { 'miscweb-apache2-error':
path => '/var/log/apache2/*error*.log',
}
rsyslog::input::file { 'miscweb-apache2-access':
path => '/var/log/apache2/*access*.log',
}
}
|