From d02e9f9e1425c745a8997deb15b4e69c8da06c1b Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:19:41 -0600 Subject: [PATCH] Create Caddyfile-dns --- wordpress/includes/Caddyfile-dns | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 wordpress/includes/Caddyfile-dns diff --git a/wordpress/includes/Caddyfile-dns b/wordpress/includes/Caddyfile-dns new file mode 100644 index 0000000..b440600 --- /dev/null +++ b/wordpress/includes/Caddyfile-dns @@ -0,0 +1,43 @@ +{ + # debug + acme_ca https://acme-staging-v02.api.letsencrypt.org/directory + email youremailhere + # default_sni yourhostnamehere +} + +yourhostnamehere { + root * /usr/local/www/wordpress + encode gzip + file_server + + log { + output file /var/log/yourhostnamehere.log + } + + php_fastcgi 127.0.0.1:9000 { + env front_controller_active true + } + + tls { + dns dns_plugin api_token + } + + header { + # enable HSTS + # Strict-Transport-Security max-age=31536000; + } + + + @forbidden { + not path /wp-includes/ms-files.php + path /xmlrpc.php + path *.sql + path /wp-content/uploads/*.php + path /wp-content/debug.log + path /wp-admin/includes/*.php + path /wp-includes/*.php + path /wp-config.php + path /.user.ini + } + respond @forbidden 403 +}