瀏覽代碼

Improve Apache2 security

Emmanuel Bouthenot 7 年之前
父節點
當前提交
65f9e442d5
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      roles/webserver/templates/apache2/conf.d/security.j2

+ 9 - 0
roles/webserver/templates/apache2/conf.d/security.j2

@@ -115,6 +115,15 @@ TraceEnable Off
     Header set X-Frame-Options: "sameorigin"
 </IfModule>
 
+#
+# Prevent at least directory listing from everywhere
+#
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+    Require all granted
+</Directory>
+
 #
 # Various protections
 #  - stuff that should not be accessible publicly