]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache-common.conf
Drop MultiViews by default (it's confusing for many people using rewrites with QSA...
[packages/apache.git] / apache-common.conf
index 326dcff241ad1a754613701b8a36f1119b68ad3a..085c5e7ef242e475e2b4aa970cbc154e200d5737 100644 (file)
@@ -24,6 +24,32 @@ DocumentRoot "/home/services/httpd/html"
        </IfModule>
 </Directory>
 
+# Prevent access to:
+# - .htaccess and .htpasswd files
+# - backup files from being viewed
+# - PHP's .user.ini
+<FilesMatch  "^(\.ht.*|\.user\.ini|.*~|.*,v)$">
+       <IfModule mod_authz_host.c>
+               Require all denied
+       </IfModule>
+       <IfModule mod_access_compat.c>
+               Order deny,allow
+               Deny from all
+       </IfModule>
+</FilesMatch>
+
+# Prevent access to:
+# - version control directories
+<DirectoryMatch "/(\.(svn|git|hg|bzr)|CVS)/?">
+       <IfModule mod_authz_host.c>
+               Require all denied
+       </IfModule>
+       <IfModule mod_access_compat.c>
+               Order deny,allow
+               Deny from all
+       </IfModule>
+</DirectoryMatch>
+
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
This page took 0.028767 seconds and 4 git commands to generate.