-
-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathCaddyfile
More file actions
30 lines (24 loc) · 680 Bytes
/
Caddyfile
File metadata and controls
30 lines (24 loc) · 680 Bytes
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
localhost
root src
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}
# allow direct access to markdown but otherwise
# rewrite to docs index page to render it
@notDirectDocsMarkdown {
path /docs/*
not path *.md
}
rewrite @notDirectDocsMarkdown /docs/index.html
redir /docs/caddyfile/directives/basicauth /docs/caddyfile/directives/basic_auth 308
redir /docs/caddyfile/directives/skip_log /docs/caddyfile/directives/log_skip 308
reverse_proxy /api/* localhost:4444