Fixup 883b3630427d3d777374cdce4c727f6db80dff3b
[slapos.git] / software / erp5 / snippet-backend.cfg
1 [apache-public-%(backend_name)s]
2 recipe = slapos.cookbook:apache.zope.backend
3 backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}/
4 ip = $${slap-network-information:global-ipv6}
5 port = %(apache_public_port)s
6 scheme = http
7 wrapper = $${basedirectory:services}/apache-public-%(backend_name)s
8 configuration-file = $${directory:apache-conf}/apache-public-%(backend_name)s.conf
9 access-control-string = %(access_control_string)s
10 pid-file = $${basedirectory:run}/apache-public-%(backend_name)s.pid
11 lock-file = $${basedirectory:run}/apache-public-%(backend_name)s.lock
12 error-log = $${basedirectory:log}/apache-public-%(backend_name)s-error.log
13 access-log = $${basedirectory:log}/apache-public-%(backend_name)s-access.log
14 apache-binary = ${apache:location}/bin/httpd
15
16 [apache-%(backend_name)s]
17 recipe = slapos.cookbook:apache.zope.backend
18 backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}/
19 ip = $${slap-network-information:global-ipv6}
20 port = %(apache_port)s
21 wrapper = $${rootdirectory:bin}/apache-%(backend_name)s
22 scheme = https
23 key-file = $${directory:apache-conf}/apache-%(backend_name)s.key
24 cert-file = $${directory:apache-conf}/apache-%(backend_name)s.crt
25 configuration-file = $${directory:apache-conf}/apache-%(backend_name)s.conf
26 access-control-string = %(access_control_string)s
27 pid-file = $${basedirectory:run}/apache-%(backend_name)s.pid
28 lock-file = $${basedirectory:run}/apache-%(backend_name)s.lock
29 error-log = $${basedirectory:log}/apache-%(backend_name)s-error.log
30 access-log = $${basedirectory:log}/apache-%(backend_name)s-access.log
31 apache-binary = ${apache:location}/bin/httpd
32
33 [ca-apache-%(backend_name)s]
34 <= certificate-authority
35 recipe = slapos.cookbook:certificate_authority.request
36 key-file = $${apache-%(backend_name)s:key-file}
37 cert-file = $${apache-%(backend_name)s:cert-file}
38 executable = $${apache-%(backend_name)s:wrapper}
39 wrapper = $${basedirectory:services}/apache-%(backend_name)s
40
41 [logrotate-entry-apache-public-%(backend_name)s]
42 <= logrotate
43 recipe = slapos.cookbook:logrotate.d
44 name = apache-public-%(backend_name)s
45 log = $${apache-public-%(backend_name)s:error-log} $${apache-public-%(backend_name)s:access-log}
46 post = ${buildout:bin-directory}/killpidfromfile $${apache-public-%(backend_name)s:pid-file} SIGUSR1
47
48 [logrotate-entry-apache-%(backend_name)s]
49 <= logrotate
50 recipe = slapos.cookbook:logrotate.d
51 name = apache-%(backend_name)s
52 log = $${apache-%(backend_name)s:error-log} $${apache-%(backend_name)s:access-log}
53 post = ${buildout:bin-directory}/killpidfromfile $${apache-%(backend_name)s:pid-file} SIGUSR1
54
55 [haproxy-%(backend_name)s]
56 recipe = slapos.cookbook:haproxy
57 name = %(backend_name)s
58 conf-path = $${rootdirectory:etc}/haproxy-%(backend_name)s.cfg
59 ip = $${slap-network-information:local-ipv4}
60 port = %(haproxy_port)s
61 maxconn = %(maxconn)s
62 server-check-path = %(server_check_path)s
63 wrapper-path = $${basedirectory:services}/haproxy-%(backend_name)s
64 binary-path = ${haproxy:location}/sbin/haproxy
65 backend-list = %(haproxy_backend_list)s