Puppet Class: profile::community_civicrm::httpd

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

Overview

SPDX-License-Identifier: Apache-2.0 sets up a webserver for community crm



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/community_civicrm/httpd.pp', line 3

class profile::community_civicrm::httpd {

    $web_root = '/var/www/community_civicrm/web'
    $site_name = 'community-crm.wmcloud.org'

    $php_version = wmflib::debian_php_version()

    class { 'httpd':
        modules => ["php${php_version}", 'rewrite'],
    }

    ensure_packages([
        "php${php_version}-xml",
        "libapache2-mod-php${php_version}",
    ])

    file { '/var/www':
        ensure => directory,
        owner  => 'www-data',
        group  => 'www-data',
    }

    file { '/var/www/community_civicrm':
        ensure => directory,
        mode   => '0755',
        owner  => 'www-data',
        group  => 'www-data',
    }

    httpd::site { 'community-crm':
        content => template('profile/community_civicrm/community-civi.apache.erb'),
        require => Package["libapache2-mod-php${php_version}"],
    }

    firewall::service { 'civicrm_http':
        proto => 'tcp',
        port  => [80],
    }

}