2
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'manifests/apache.pp', line 2
class ratticdb::apache {
if $::ratticdb::apache {
class { '::apache':
default_vhost => false,
}
apache::vhost {"redirect-${::ratticdb::url}":
servername => $::ratticdb::url,
port => '80',
docroot => $::ratticdb::appFolder,
redirect_status => 'permanent',
redirect_dest => "https://${::ratticdb::url}",
manage_docroot => false,
}
if $::ratticdb::sslCert != undef {
file { $::ratticdb::sslCertPath:
content => $::ratticdb::sslCert,
}
file { $::ratticdb::sslCertKeyPath:
content => $::ratticdb::sslKeyCert,
}
}
apache::vhost { $::ratticdb::url:
port => '443',
ssl => true,
ssl_honorcipherorder => 'on',
ssl_cert => $::ratticdb::sslCertPath,
ssl_key => $::ratticdb::sslCertKeyPath,
docroot => $::ratticdb::appFolder,
manage_docroot => false,
wsgi_application_group => '%{GLOBAL}',
wsgi_daemon_process => 'rattic',
wsgi_daemon_process_options => {
processes => '2',
threads => '25',
display-name => '%{GROUP}',
home => $::ratticdb::appFolder,
python-path => $::ratticdb::appFolder
},
wsgi_pass_authorization => 'on',
wsgi_process_group => 'rattic',
wsgi_script_aliases => {
'/' => "${::ratticdb::appFolder}/ratticweb/wsgi.py"
},
aliases => [
{
aliasmatch => '^/([^/]*\.css)',
path => '/opt/apps/RatticWeb/static/styles/$1',
},
{
alias => '/favicon.ico',
path => "${::ratticdb::appFolder}/static/favicon.ico",
},
{
alias => '/robots.txt',
path => "${::ratticdb::appFolder}/static/robots.txt",
},
{
alias => '/media',
path => "${::ratticdb::appFolder}/media",
},
{
alias => '/static',
path => "${::ratticdb::appFolder}/static",
},
],
}
}
}
|