-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
53 lines (48 loc) · 1.33 KB
/
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
:8000 {
handle_path /own-your-stack/* {
root * docs
file_server
templates {
extensions {
# Uncomment this if you have the caddy-hitcounter plugin (https://github.com/mholt/caddy-hitcounter):
# hitCounter {
# style bright_green
# pad_digits 6
# }
}
}
encode zstd gzip
try_files {path}.html {path}
}
handle_path /* {
root * docs
file_server
templates {
extensions {
# Uncomment this if you have the caddy-hitcounter plugin (https://github.com/mholt/caddy-hitcounter):
# hitCounter {
# style bright_green
# pad_digits 6
# }
}
}
encode zstd gzip
try_files {path}.html {path}
}
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
templates {
extensions {
# Uncomment this if you have the caddy-hitcounter plugin (https://github.com/mholt/caddy-hitcounter):
# hitCounter {
# style bright_green
# pad_digits 6
# }
}
}
file_server
}
}