From 939e31fe3ff6157e6c87fda05f8c1dc172441454 Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Mon, 14 Mar 2022 20:31:25 +0000 Subject: [PATCH] Disable indexes by default --- templates/apache2.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/apache2.conf.j2 b/templates/apache2.conf.j2 index 350a0f5..bea69a8 100644 --- a/templates/apache2.conf.j2 +++ b/templates/apache2.conf.j2 @@ -177,18 +177,20 @@ Include ports.conf </Directory> <Directory "/var/www/"> - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride None Require all granted </Directory> +{% if apache_chroot is defined and apache_chroot %} <IfFile "{{ apache_chroot_dir }}/var/www"> <Directory "{{ apache_chroot_dir }}/var/www/"> - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride None Require all granted </Directory> </IfFile> +{% endif %} #<Directory /srv/> # Options Indexes FollowSymLinks -- GitLab