Преглед на файлове

Fix apache2 security configuration to disable Directory Indexing on /var/www

Emmanuel Bouthenot преди 5 години
родител
ревизия
5e1cc88097
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7 1
      roles/webserver/templates/apache2/conf.d/security.j2

+ 7 - 1
roles/webserver/templates/apache2/conf.d/security.j2

@@ -119,7 +119,13 @@ TraceEnable Off
 # Prevent at least directory listing from everywhere
 #
 <Directory />
-    Options FollowSymLinks
+    Options -Indexes +FollowSymLinks
+    AllowOverride None
+    Require all granted
+</Directory>
+
+<Directory /var/www>
+    Options -Indexes +FollowSymLinks
     AllowOverride None
     Require all granted
 </Directory>