Puppet Class: profile::phabricator::httpd

Defined in:
modules/profile/manifests/phabricator/httpd.pp

Overview

sets up a webserver configured for phabricator

Parameters:

  • enable_forensic_log (Boolean) (defaults to: hiera('profile::phabricator::httpd::enable_forensic_log', false))


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
# File 'modules/profile/manifests/phabricator/httpd.pp', line 3

class profile::phabricator::httpd (
    Boolean $enable_forensic_log = hiera('profile::phabricator::httpd::enable_forensic_log', false),
) {

    $httpd_base_modules = [ 'headers', 'rewrite', 'remoteip' ]

    if os_version('debian == buster') {
        $php_lib = 'php7.3-fpm'
    } else {
        $php_lib = 'php7.2-fpm'
    }
    $httpd_extra_modules = [ 'proxy', 'proxy_fcgi' ]

    $httpd_modules = concat($httpd_base_modules, $httpd_extra_modules)

    class { '::httpd':
        modules => $httpd_modules,
        require => Package[$php_lib],
    }

    # MPM tweaks for high load systems
    # More performance specific tweaks to follow here
    class { '::httpd::mpm':
        mpm    => 'worker',
        source => 'puppet:///modules/phabricator/apache/worker.conf',
    }

    # Forensic logging (logs requests at both beginning and end of request processing)
    if $enable_forensic_log {
        ::httpd::mod_conf { 'log_forensic':
            ensure  => present,
        }

        ::httpd::conf { 'log_forensic':
            ensure  => present,
            source  => 'puppet:///modules/phabricator/apache/log_forensic.conf',
            require => Httpd::Mod_conf['log_forensic'],
        }
    }
}