]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache-common.conf
update doc links to 2.4 version
[packages/apache.git] / apache-common.conf
index 9b53aa508d482c7e0ef63ac18231dee688f9f7ea..085c5e7ef242e475e2b4aa970cbc154e200d5737 100644 (file)
@@ -16,11 +16,40 @@ DocumentRoot "/home/services/httpd/html"
        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.
 #
@@ -50,51 +79,11 @@ DocumentRoot "/home/services/httpd/html"
        # 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>
This page took 0.027819 seconds and 4 git commands to generate.