Files
wedding-site/docker/caddy/conf/Caddyfile
MH.Dmitrii 807beb1496
Some checks failed
Build Docker / deploy (push) Successful in 54s
Build Docker / build (push) Failing after 1s
remove music from caddy conf
2026-05-17 17:22:44 +03:00

59 lines
1.2 KiB
Caddyfile

http://ru.homyk.space {
redir https://ru.homyk.space{uri} permanent
}
https://ru.homyk.space {
encode gzip
handle /api/* {
reverse_proxy backend:{$PORT}
}
handle_path /main/* {
@images path_regexp \.(jpg|jpeg|png|webp|gif|svg)$
header @images Cache-Control "public, max-age=604800"
forward_auth backend:{$PORT} {
uri /api/verify
copy_headers Authorization
}
root * /srv/main
file_server
}
handle_errors {
@unauth expression {http.error.status_code} == 401
redir @unauth / 302
}
handle {
root * /srv/auth
file_server {
index login.html
}
}
log {
output file /data/logs/caddy.log {
roll_size 5mb
roll_keep 5
roll_keep_for 72h
}
format json
}
}
// https://music.homyk.space {
// encode gzip
// # --- API ---
// handle {
// reverse_proxy koel:80
// }
// log {
// output file /data/logs/caddy1.log {
// roll_size 5mb
// roll_keep 5
// roll_keep_for 72h
// }
// format json
// }
// }