forked from Raku/doc-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
38 lines (29 loc) · 765 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
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
:80 {
log {
output stdout
}
root * /usr/share/caddy
encode gzip
map {path} {npath} {
import /usr/share/caddy/assets/deprecated-urls
import /usr/share/caddy/assets/prettyurls
}
route {
error /hashed* 404
try_files {npath}.html {path}.html {path}
}
uri /type/* replace :: /
# Enable the static file server.
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
file_server
}
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile