caddy-website/Caddyfile
2020-05-17 17:19:15 -04:00

30 lines
512 B
Caddyfile

localhost
root * src
file_server
templates
encode 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
rewrite /docs/* /docs/index.html
reverse_proxy /api/* localhost:4444
handle_errors {
@error {
expression {http.error.status_code} in [404, 500]
}
handle @error {
rewrite 404.html
root * src
encode gzip
templates
file_server
}
}