2016-10-17 04:05:49 +02:00
|
|
|
class zulip_ops::apache {
|
2013-11-08 21:18:03 +01:00
|
|
|
$apache_packages = [# Needed to run Apache with WSGI
|
2018-08-13 21:29:40 +02:00
|
|
|
'apache2',
|
|
|
|
'libapache2-mod-wsgi',
|
2013-11-08 21:18:03 +01:00
|
|
|
]
|
2022-03-16 01:23:53 +01:00
|
|
|
package { $apache_packages: ensure => installed }
|
2020-07-09 00:24:41 +02:00
|
|
|
service { 'apache2':
|
|
|
|
require => Package['apache2'],
|
|
|
|
}
|
2013-02-07 22:20:10 +01:00
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
apache2mod { [ 'headers', 'proxy', 'proxy_http', 'rewrite', 'auth_digest', 'ssl' ]:
|
2013-02-08 18:46:43 +01:00
|
|
|
ensure => present,
|
|
|
|
require => Package['apache2'],
|
2020-07-09 00:24:41 +02:00
|
|
|
notify => Service['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/certs/':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package['apache2'],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2023-01-26 23:26:51 +01:00
|
|
|
mode => '0755',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/ports.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package[apache2],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0640',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/apache/ports.conf',
|
2020-07-09 00:24:41 +02:00
|
|
|
notify => Service['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/sites-available/':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
2013-02-07 22:20:10 +01:00
|
|
|
require => Package[apache2],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2023-01-26 23:26:51 +01:00
|
|
|
mode => '0750',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
}
|