mirror of
https://github.com/caddyserver/website.git
synced 2025-04-23 21:46:16 -04:00
32 lines
671 B
Caddyfile
32 lines
671 B
Caddyfile
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}
|
|
|
|
redir /docs/json /docs/json/
|
|
redir /docs/modules /docs/modules/
|
|
rewrite /docs/json/* /docs/json/index.html
|
|
rewrite /docs/modules/* /docs/modules/index.html
|
|
|
|
# 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
|
|
|
|
reverse_proxy /api/* localhost:4444
|