소스 검색

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

Emmanuel Bouthenot 4 년 전
부모
커밋
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>