Options FollowSymLinks
AllowOverride None
<IfModule mod_authz_host.c>
+ Require all denied
+ </IfModule>
+ <IfModule mod_access_compat.c>
Order deny,allow
Deny from all
</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.
#
# Controls who can get stuff from this server.
#
<IfModule mod_authz_host.c>
- Order allow,deny
- Allow from all
+ Require all granted
</IfModule>
-
-</Directory>
-
-# "/home/services/httpd/cgi-bin" should be changed to whatever your ScriptAliased
-# CGI directory exists, if you have that configured.
-#
-<Directory "/home/services/httpd/cgi-bin">
- AllowOverride None
- Options None
- <IfModule mod_authz_host.c>
+ <IfModule mod_access_compat.c>
Order allow,deny
Allow from all
</IfModule>
-</Directory>
-# Customizable error responses come in three flavors:
-# 1) plain text 2) local redirects 3) external redirects
-#
-# Some examples:
-#ErrorDocument 500 "The server made a boo boo."
-#ErrorDocument 404 /missing.html
-#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
-#ErrorDocument 402 http://www.example.com/subscription_info.html
-#
-
-#
-# EnableMMAP and EnableSendfile: On systems that support it,
-# memory-mapping or the sendfile syscall is used to deliver
-# files. This usually improves server performance, but must
-# be turned off when serving from networked-mounted
-# filesystems or if support for these functions is otherwise
-# broken on your system.
-#
-#EnableMMAP off
-#EnableSendfile off
-
-# Supplemental configuration
-#
-# The configuration files in the /extra/ directory can be
-# included to add extra features or to modify the default configuration of
-# the server, or you may simply copy their contents here and change as
-# necessary.
-
-# Language settings
-#Include /extra/httpd-languages.conf
+</Directory>