-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
65 lines (49 loc) · 843 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(logformat) {
log {
output stdout
format console
}
}
{
auto_https off
}
(thestatic) {
root /caddy/static
# serve existing files in /img, /art and /thumbs
file_server {
pass_thru
}
# pass everything else to reverse proxy
reverse_proxy localhost:3000
}
(thefiles) {
root /caddy/static/files
import /etc/caddy/caddy-auth.conf
templates
file_server {
browse /caddy/browse-thumbs.html
}
}
http://files.leggi.es {
encode gzip zstd
import logformat
import thefiles
route /thumbs/* {
import thestatic
}
}
:80 {
root * /caddy/static
encode gzip zstd
import logformat
# use caddy file browser for /files
redir /files /files/
handle_path /files/* {
import thefiles
}
redir /ftpfile /files{uri}
redir /getfile /files{uri}
route {
import thestatic
}
}