# ╭──────────────────────────────────────────────────────────╮ # │ _ _ │ # │ _ __ | |__ ___ ___ _ __ | |__ ___ _ __ _ _ ___ │ # │ | '_ \| '_ \ / _ \/ __| '_ \| '_ \ / _ \| '__| | | / __| │ # │ | |_) | | | | (_) \__ \ |_) | | | | (_) | | | |_| \__ \ │ # │ | .__/|_| |_|\___/|___/ .__/|_| |_|\___/|_| \__,_|___/ │ # │ |_| |_| │ # ╰──────────────────────────────────────────────────────────╯ # caddy configurations for phosphorus # ============================================================================= # ╭────────────────────────────────╮ # │ 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 1 roll_keep_for 120h # 3 days } } } # 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 merp@merpmerp.merp 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/*