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
|
|
|
|
"apache2",
|
|
|
|
"libapache2-mod-wsgi",
|
|
|
|
]
|
2013-02-07 22:20:10 +01:00
|
|
|
package { $apache_packages: ensure => "installed" }
|
|
|
|
|
|
|
|
apache2mod { [ "headers", "proxy", "proxy_http", "rewrite", "auth_digest", "ssl" ]:
|
2013-02-08 18:46:43 +01:00
|
|
|
ensure => present,
|
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/users/":
|
2013-02-08 18:46:43 +01:00
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
ensure => directory,
|
|
|
|
owner => "www-data",
|
|
|
|
group => "www-data",
|
|
|
|
mode => 600,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/users/wiki":
|
|
|
|
require => File["/etc/apache2/users/"],
|
|
|
|
ensure => file,
|
|
|
|
owner => "www-data",
|
|
|
|
group => "www-data",
|
|
|
|
mode => 600,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => "puppet:///modules/zulip_ops/apache/users",
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/certs/":
|
2013-02-08 18:46:43 +01:00
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
ensure => directory,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/ports.conf":
|
|
|
|
require => Package[apache2],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 640,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => "puppet:///modules/zulip_ops/apache/ports.conf",
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/sites-available/":
|
2016-07-21 07:46:02 +02:00
|
|
|
ensure => directory,
|
2013-02-07 22:20:10 +01:00
|
|
|
require => Package[apache2],
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 640,
|
|
|
|
}
|
|
|
|
}
|