Puppet Class: profile::phabricator::httpd

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

Overview

SPDX-License-Identifier: Apache-2.0 sets up a webserver configured for phabricator

Parameters:

  • enable_forensic_log (Boolean) (defaults to: lookup('profile::phabricator::httpd::enable_forensic_log', {'default_value' => false}))


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

class profile::phabricator::httpd (
    Boolean $enable_forensic_log = lookup('profile::phabricator::httpd::enable_forensic_log', {'default_value' => false}),
) {

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

    $php_version = wmflib::debian_php_version()
    $php_lib = "php${php_version}-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'],
        }
    }
}