Puppet Class: profile::matomo::webserver
- Defined in:
- modules/profile/manifests/matomo/webserver.pp
Overview
SPDX-License-Identifier: Apache-2.0
Class: profile::matomo::webserver
Apache webserver instance configured with mpm-prefork and mod_php. This configuration should be improved with something more up to date like mpm-event and php-fpm/hhmv.
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 51 52 53 54 55 |
# File 'modules/profile/manifests/matomo/webserver.pp', line 8
class profile::matomo::webserver {
include profile::prometheus::apache_exporter
$php_version = wmflib::debian_php_version()
$php_module = "php${php_version}"
$php_ini = "/etc/php/${php_version}/apache2/php.ini"
package { "${php_module}-mbstring":
ensure => 'present',
}
package { "${php_module}-xml":
ensure => 'present',
}
package { "libapache2-mod-${php_module}":
ensure => 'present',
}
class { 'httpd':
modules => ['headers', $php_module, 'rewrite'],
require => Package["libapache2-mod-${php_module}"],
}
class { 'httpd::mpm':
mpm => 'prefork',
source => 'puppet:///modules/profile/matomo/mpm_prefork.conf',
}
profile::auto_restarts::service { 'apache2': }
profile::auto_restarts::service { 'envoyproxy': }
require profile::analytics::httpd::utils
include profile::idp::client::httpd
file_line { 'enable_php_opcache':
line => 'opcache.enable=1',
match => '^;?opcache.enable\s*\=',
path => $php_ini,
notify => Class['httpd'],
}
file_line { 'php_memory_limit':
line => 'memory_limit = 256M',
match => '^;?memory_limit\s*\=',
path => $php_ini,
notify => Class['httpd'],
}
}
|