blob: beb4b3ea2959480375e830847a65d94189fc31fb [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
87Example pillar
88==============
89
90Roundcube webmail, postfixadmin and mailman
91
92.. code-block:: yaml
93
94 classes:
95 - service.apache.server.single
96 parameters:
97 apache:
98 server:
99 modules:
100 - cgi
101 - php
102 site:
103 roundcube:
104 enabled: true
105 type: static
106 name: roundcube
107 root: /usr/share/roundcube
108 locations:
109 - uri: /admin
110 path: /usr/share/postfixadmin
111 - uri: /mailman
112 path: /usr/lib/cgi-bin/mailman
113 script: true
114 - uri: /pipermail
115 path: /var/lib/mailman/archives/public
116 - uri: /images/mailman
117 path: /usr/share/images/mailman
118 host:
119 name: mail.example.com
120 aliases:
121 - mail.example.com
122 - lists.example.com
123 - mail01.example.com
124 - mail01
125
126Read more
127=========
128
129* https://httpd.apache.org/docs/