diff --git a/roles/caddy/templates/etc/caddy/conf.d/vhost.j2 b/roles/caddy/templates/etc/caddy/conf.d/vhost.j2 index 00bcb5a..b02e77d 100644 --- a/roles/caddy/templates/etc/caddy/conf.d/vhost.j2 +++ b/roles/caddy/templates/etc/caddy/conf.d/vhost.j2 @@ -33,7 +33,14 @@ encode zstd gzip file_server - {% endif %} + {% elif has_wordpress -%} + root * {{ document_root }} + encode + {% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('12', '==') -%} + php_fastcgi unix//run/php/php8.2-fpm-{{ domain_name }}.sock + {% endif -%} + file_server + {% endif -%} import security-headers }