Adds additional caddy config keys #7

Merged
OCram85 merged 2 commits from fixCaddy into master 2022-01-11 14:17:41 +01:00
2 changed files with 32 additions and 12 deletions
Showing only changes of commit c3971f8e34 - Show all commits

View File

@ -1,12 +1,16 @@
:8080 { {
root * /usr/share/caddy auto_https off
file_server }
encode gzip zstd
handle_errors { :8080 {
@404 { root * /usr/share/caddy
expression {http.error.status_code} == 404 file_server
} encode gzip zstd
rewrite @404 /404.html handle_errors {
file_server @404 {
} expression {http.error.status_code} == 404
} }
rewrite @404 /404.html
file_server
}
}

16
Caddyfile.back Normal file
View File

@ -0,0 +1,16 @@
{
auto_https off
}
:8080 {
root * /usr/share/caddy
file_server
encode gzip zstd
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
file_server
}
}