add reworked caddy configs from current setup

This commit is contained in:
Ruben 2025-07-12 00:09:31 -05:00
commit 76ec7d0505
No known key found for this signature in database
GPG key ID: 8EA836555FB6D9A5
23 changed files with 420 additions and 1 deletions

56
.old/etc/caddy/Caddyfile Normal file
View file

@ -0,0 +1,56 @@
# ╭────────────────────────────────────────────╮
# │ _ _ __ _ _ │
# │ ___ __ _ __| | __| |_ _ / _(_) | ___ │
# │ / __/ _` |/ _` |/ _` | | | | |_| | |/ _ \ │
# │ | (_| (_| | (_| | (_| | |_| | _| | | __/ │
# │ \___\__,_|\__,_|\__,_|\__, |_| |_|_|\___| │
# │ |___/ │
# ╰────────────────────────────────────────────╯
# synth.download's *current* caddyfile - will need to be entirely revampled once we actually get to the server migration. whenever that happens :p
# =============================================================================
# ╭────────────────────────────────╮
# │ commonly reused rules/snippets │
# ╰────────────────────────────────╯
# common settings - globally enables settings that are commonly used in every snippet
(common-settings) {
encode zstd gzip
}
# log - reused log settings
(log) {
log {
output file /var/log/caddy/{args[0]} {
roll_size 10MB
roll_keep 3
}
}
}
# robots-txt - link /robots.txt to the same file
(robots-txt) {
handle_path /robots.txt {
root * /var/www/robots.txt
file_server
}
}
# =============================================================================
# ╭──────────────────────────╮
# │ main/general information │
# ╰──────────────────────────╯
{
email synth@synth.download
import log caddy
}
# ╭───────────────────────────────────────────────────────────────────────────╮
# │ do an nginx and seperate snippets for sites into /etc/caddy/sites-enabled │
# ╰───────────────────────────────────────────────────────────────────────────╯
# to "disable" anything, just move the file to /etc/caddy/sites-disabled and reload caddy
import /etc/caddy/sites-enabled/*