# ╭────────────────────────────────────────────╮ # │ _ _ __ _ _ │ # │ ___ __ _ __| | __| |_ _ / _(_) | ___ │ # │ / __/ _` |/ _` |/ _` | | | | |_| | |/ _ \ │ # │ | (_| (_| | (_| | (_| | |_| | _| | | __/ │ # │ \___\__,_|\__,_|\__,_|\__, |_| |_|_|\___| │ # │ |___/ │ # ╰────────────────────────────────────────────╯ # 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/*