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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'manifests/install/apache.pp', line 3
class ckan::install::apache {
file { '/etc/ckan/datapusher.wsgi':
ensure => file,
source => 'puppet:///modules/ckan/datapusher.wsgi',
}
file { '/etc/ckan/datapusher_settings.py':
ensure => file,
source => 'puppet:///modules/ckan/datapusher_settings.py',
require => File['/etc/ckan/datapusher.wsgi'],
}
file { '/etc/ckan/default/apache.wsgi':
ensure => file,
source => 'puppet:///modules/ckan/apache.wsgi',
require => File['/etc/ckan/datapusher_settings.py'],
}
class { 'apache':
default_vhost => false,
service_manage => false,
purge_configs => true,
purge_vhost_dir => true,
timeout => $ckan::apache_timeout,
}
contain apache
class { 'apache::mod::wsgi':
wsgi_socket_prefix => '/var/run/wsgi',
}
contain apache::mod::wsgi
contain apache::mod::rpaf
apache::vhost { 'default_ckan':
port => '8080',
ip => '0.0.0.0',
servername => $ckan::server_name,
serveraliases => ["www.${ckan::server_name}"],
error_log_file => '/var/log/apache2/ckan_default.error.log',
docroot => '/var/www',
default_vhost => true,
directories => [{
path => '/',
provider => 'directories',
require => 'all granted',
}],
wsgi_daemon_process => 'ckan_default',
wsgi_daemon_process_options => {
processes => '2',
threads => '15',
display-name => 'ckan_default',
},
wsgi_process_group => 'ckan_default',
wsgi_script_aliases => { '/' => '/etc/ckan/default/apache.wsgi' },
wsgi_pass_authorization => 'on',
custom_fragment => "CustomLog /var/log/apache2/ckan_default.custom.log combined
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1
</IfModule>",
}
apache::vhost { 'datapusher':
port => '8800',
ip => '0.0.0.0',
#servername => 'ckan',
servername => $ckan::server_name,
error_log_file => '/var/log/apache2/datapusher.error.log',
docroot => '/var/www',
directories => [{
path => '/',
provider => 'directories',
require => 'all granted',
}],
wsgi_daemon_process => 'datapusher',
wsgi_daemon_process_options => {
processes => '1',
threads => '15',
display-name => 'demo',
},
wsgi_process_group => 'datapusher',
wsgi_script_aliases => { '/' => '/etc/ckan/datapusher.wsgi' },
wsgi_pass_authorization => 'on',
custom_fragment => 'CustomLog /var/log/apache2/datapusher.custom.log combined',
}
}
|