blob: 2e41e814b09505532fe5a2df1bf9f77c7df0cd56 [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:
113 modules:
114 - cgi
115 - php
116 site:
117 roundcube:
118 enabled: true
119 type: static
120 name: roundcube
121 root: /usr/share/roundcube
122 locations:
123 - uri: /admin
124 path: /usr/share/postfixadmin
125 - uri: /mailman
126 path: /usr/lib/cgi-bin/mailman
127 script: true
128 - uri: /pipermail
129 path: /var/lib/mailman/archives/public
130 - uri: /images/mailman
131 path: /usr/share/images/mailman
132 host:
133 name: mail.example.com
134 aliases:
135 - mail.example.com
136 - lists.example.com
137 - mail01.example.com
138 - mail01
139
140Read more
141=========
142
143* https://httpd.apache.org/docs/