Files
wedding-site/docker/caddy/conf/Caddyfile
MH.Dmitrii 66b6878e50
All checks were successful
Build Docker / deploy (push) Successful in 40s
Build Docker / build (push) Successful in 35s
cache images
2026-03-19 03:06:41 +03:00

59 lines
1.1 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
}
}