2012-08-04 13:10:26 -05:00
|
|
|
class etherpad_lite::apache (
|
|
|
|
$vhost_name = $fqdn,
|
|
|
|
$etherpad_crt,
|
|
|
|
$etherpad_key
|
|
|
|
) {
|
|
|
|
|
|
|
|
include remove_nginx
|
|
|
|
|
|
|
|
apache::vhost { $vhost_name:
|
2012-08-12 10:47:51 -07:00
|
|
|
port => 443,
|
2012-08-04 13:10:26 -05:00
|
|
|
docroot => 'MEANINGLESS ARGUMENT',
|
|
|
|
priority => '50',
|
2012-08-12 10:47:51 -07:00
|
|
|
template => 'etherpad_lite/etherpadlite.vhost.erb',
|
2012-08-04 13:10:26 -05:00
|
|
|
require => File["/etc/ssl/certs/${vhost_name}.pem",
|
|
|
|
"/etc/ssl/private/${vhost_name}.key"],
|
|
|
|
ssl => true,
|
|
|
|
}
|
|
|
|
a2mod { 'rewrite':
|
|
|
|
ensure => present
|
|
|
|
}
|
|
|
|
a2mod { 'proxy':
|
|
|
|
ensure => present
|
|
|
|
}
|
|
|
|
a2mod { 'proxy_http':
|
|
|
|
ensure => present
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/ssl/certs':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
mode => 0700,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/ssl/private':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
mode => 0700,
|
|
|
|
}
|
|
|
|
|
2012-08-12 10:47:51 -07:00
|
|
|
file { "/etc/ssl/certs/${vhost_name}.pem":
|
2012-08-04 13:10:26 -05:00
|
|
|
ensure => present,
|
|
|
|
replace => true,
|
|
|
|
owner => 'root',
|
|
|
|
mode => 0600,
|
|
|
|
content => template('etherpad_lite/eplite.crt.erb'),
|
2012-08-12 10:47:51 -07:00
|
|
|
require => File['/etc/ssl/certs'],
|
2012-08-04 13:10:26 -05:00
|
|
|
}
|
|
|
|
|
2012-08-12 10:47:51 -07:00
|
|
|
file { "/etc/ssl/private/${vhost_name}.key":
|
2012-08-04 13:10:26 -05:00
|
|
|
ensure => present,
|
|
|
|
replace => true,
|
|
|
|
owner => 'root',
|
|
|
|
mode => 0600,
|
|
|
|
content => template('etherpad_lite/eplite.key.erb'),
|
2012-08-12 10:47:51 -07:00
|
|
|
require => File['/etc/ssl/private'],
|
2012-08-04 13:10:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|