-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathweb.yml
176 lines (126 loc) · 5.47 KB
/
web.yml
1
2
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
# ---- User variables ----
inventory_dokuwiki:
# Name of system user to run the application as
user: 'git-wiki'
# Name of system group to run the application as
group: 'git-wiki'
# Default SSH public key to use for this user account
# (required for access to git-shell)
sshkey: '{{ lookup("file","~/.ssh/id_rsa.pub") }}'
# Domain name to use for DokuWiki page
domain: 'dokuwiki.{{ ansible_domain }}'
# Maximum size of the request, in megabytes
max_file_size: '20'
# ---- APT Package Manager configuration ----
# This variable is exposed, in case mirror selected by Debian's CDN network has
# problems - you can then switch for the other one and it should probably work
apt_debian_http_mirror: 'cdn.debian.net'
#apt_debian_http_mirror: 'ftp.us.debian.org'
# Here you can add additional packages to install
apt_host_packages: [ 'graphviz' ]
# ---- User account setup ----
# debops.gitusers is a role which manages user accounts with specific
# privileges, restricted only to access to git commands.
gitusers_host_list:
# You can access this account as: 'ssh git-wiki@hostname'. Your SSH key
# should be set up automatically.
- name: '{{ inventory_dokuwiki.user }}'
group: '{{ inventory_dokuwiki.group }}'
sshkeys: [ '{{ inventory_dokuwiki.sshkey }}' ]
# ---- Host services ----
# Enabled nginx server configurations:
# - nginx_server_default (defined in the debops.nginx role)
# - nginx_server_dokuwiki (defined below)
nginx_servers: [ '{{ nginx_server_default }}', '{{ nginx_server_dokuwki }}' ]
# Enabled nginx upstream configurations:
# - nginx_upstream_php5 (defined in the debops.nginx role)
# - nginx_upstream_dokuwiki (defined below)
nginx_upstreams: [ '{{ nginx_upstream_php5 }}', '{{ nginx_upstream_dokuwiki }}' ]
# Enabled PHP5 pools:
# - php5_pool_default (defined in the debops.php5 role)
# - php5_pool_dokuwiki (defined below)
php5_pools: [ '{{ php5_pool_default }}', '{{ php5_pool_dokuwiki }}' ]
# ---- Nginx server for DokuWiki instance ----
# Server configuration converted from http://wiki.nginx.org/Dokuwiki
# Not everything is currently implemented (for example, map $scheme {} is missing)
# SSL is enabled by default with self-signed certificate generated by
# debops.pki role
# Generated configuration can be found in /etc/nginx/sites-available/
nginx_server_dokuwki:
# This server should be enabled
enabled: True
# Default domain on which this DokuWiki instance will be accessible
name: [ '{{ inventory_dokuwiki.domain }}' ]
# List of domains which will redirect HTTP requests to main domain
redirect_from: [ 'www.{{ inventory_dokuwiki.domain }}' ]
# User and group which manage this DokuWiki instance (compatible with
# debops.gitusers role configuration)
owner: '{{ inventory_dokuwiki.user }}'
group: '{{ inventory_dokuwiki.group }}'
# Enable PHP5 support for this nginx server
type: 'php5'
# Options included in server { } block
options: |
autoindex off;
client_max_body_size {{ inventory_dokuwiki.max_file_size }}M;
client_body_buffer_size 128k;
# List of index files to look for by default
index: 'index.html index.htm index.php doku.php'
# Definitions of location { } blocks in text block format; there's also
# 'location_list' with more strict key-value format available)
location:
'/': |
try_files $uri $uri/ @dokuwiki;
'@dokuwiki': |
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1 last;
'~ ^/lib.*\.(gif|png|ico|jpg)$': |
expires 30d;
'~ /(data|conf|bin|inc)/': |
deny all;
# Name of nginx upstream configuration to use for 'php5-fpm' connection,
# configured in PHP5 location { } block
php5: 'php5_dokuwiki'
# Options included in PHP5 location { } block
php5_options: |
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
# ---- nginx upstream configuration for DokuWiki ----
# Generated configuration can be found in /etc/nginx/conf.d/
nginx_upstream_dokuwiki:
# This upstream should be enabled
enabled: True
# Upstream name to use in nginx configuration, "php5" value
name: 'php5_dokuwiki'
# This upstream serves PHP5 content using 'php5-fpm',
# configured by debops.php5 role
type: 'php5'
# Name of 'php5-fpm' pool to use
php5: 'dokuwiki'
# ---- PHP5 (php5-fpm) pool for DokuWiki instance ----
# Generated configuration can be found in /etc/php5/fpm/pool-available.d/
php5_pool_dokuwiki:
# This php5-fpm pool should be enabled
enabled: True
# Name of php5-fpm pool, which should be specified in nginx upstream
# configuration "php5" value
name: 'dokuwiki'
# System user and group to use for running this php5-fpm pool. This pool
# processes will have access to all files readable and writable by this user
# and group
user: '{{ inventory_dokuwiki.user }}'
group: '{{ inventory_dokuwiki.group }}'
# PHP5 variable configuration
php_admin_value:
post_max_size: '{{ inventory_dokuwiki.max_file_size }}M'
upload_max_filesize: '{{ inventory_dokuwiki.max_file_size }}M'