-
Notifications
You must be signed in to change notification settings - Fork 17
/
Caddyfile
45 lines (38 loc) · 929 Bytes
/
Caddyfile
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
local.taiga.io {
# backend admin and api
@taiga-back path /admin* /api*
handle @taiga-back {
reverse_proxy 127.0.0.1:8001
}
# events
handle /events* {
reverse_proxy 127.0.0.1:8888
}
# static and frontend
handle {
root /static/* /home/taiga/taiga-back
root * /home/taiga/taiga-front-dist/dist
try_files {path} {path}/ /index.html
file_server
}
# unprotected section
handle /media/exports/* {
header Content-disposition "attachment"
root * /home/taiga/taiga-back
file_server
}
# protected section
handle_path /media/* {
reverse_proxy localhost:8003 {
@accel header X-Accel-Redirect *
handle_response @accel {
root * /home/taiga/taiga-back
header Content-Disposition "attachment"
rewrite {http.reverse_proxy.header.X-Accel-Redirect}
file_server
}
}
}
# TLS, log, etc
# Configure your TLS following the best practices inside your company
}