blob: a06d296582c5e0bdcb40e2e50126e05365a4b281 [file] [log] [blame]
Filip Pytloun410abc42015-10-06 16:28:31 +02001======
2Apache
3======
4
5Install and configure Apache webserver
6
7Available states
8================
9
10.. contents::
11 :local:
12
13``apache.server``
14--------------------
15
16Setup apache server
17
18Available metadata
19==================
20
21.. contents::
22 :local:
23
24``metadata.apache.server.single``
25--------------------------
26
27Setup basic server
28
29Configuration parameters
30========================
31
32
33Example reclass
34===============
35
36Simple Apache proxy
37
38.. code-block:: yaml
39
40 apache:
41 server:
42 enabled: true
43 bind:
44 address: '0.0.0.0'
45 ports:
46 - 80
47 modules:
48 - proxy
49 - proxy_http
50 - proxy_balancer
51
52
53Apache plain static sites (eg. sphinx generated, from git/hg sources)
54
55.. code-block:: yaml
56
57 apache:
58 server:
59 enabled: true
60 bind:
61 address: '0.0.0.0'
62 ports:
63 - 80
64 modules:
65 - rewrite
66 - status
67 site:
68 - enabled: true
69 name: 'sphinxdoc'
70 type: 'static'
71 host:
72 name: 'doc.domain.com'
73 port: 80
74 source:
75 engine: local
76 - enabled: true
77 name: 'impressjs'
78 type: 'static'
79 host:
80 name: 'pres.domain.com'
81 port: 80
82 source:
83 engine: git
84 address: 'git@repo1.domain.cz:impress/billometer.git'
85 revision: 'master'
86
Filip Pytlounc135fa52015-11-25 12:28:45 +010087Tune settings of mpm_prefork
88
89.. code-block:: yaml
90
91 parameters:
92 apache:
93 mpm:
94 prefork:
95 max_clients: 250
96 servers:
97 min: 32
98 max: 64
99 max_requests: 4000
100
Filip Pytloun410abc42015-10-06 16:28:31 +0200101Example pillar
102==============
103
104Roundcube webmail, postfixadmin and mailman
105
106.. code-block:: yaml
107
108 classes:
109 - service.apache.server.single
110 parameters:
111 apache:
112 server:
jan kaufman75aae5c2016-01-26 14:49:12 +0100113 enabled: true
Filip Pytloun410abc42015-10-06 16:28:31 +0200114 modules:
115 - cgi
116 - php
117 site:
118 roundcube:
119 enabled: true
120 type: static
121 name: roundcube
122 root: /usr/share/roundcube
123 locations:
124 - uri: /admin
125 path: /usr/share/postfixadmin
126 - uri: /mailman
127 path: /usr/lib/cgi-bin/mailman
128 script: true
129 - uri: /pipermail
130 path: /var/lib/mailman/archives/public
131 - uri: /images/mailman
132 path: /usr/share/images/mailman
133 host:
134 name: mail.example.com
135 aliases:
136 - mail.example.com
137 - lists.example.com
138 - mail01.example.com
139 - mail01
140
141Read more
142=========
143
144* https://httpd.apache.org/docs/