[packages/apache/APACHE_2_2] Add EnableSendfile on. Prevent web clients from accessing htaccess files and backup files (~ so far)

arekm arekm at pld-linux.org
Thu Jul 3 13:52:29 CEST 2014


commit 11d294e5dbf87b90b7c424362ea628d80993ccc1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Jul 3 13:52:25 2014 +0200

    Add EnableSendfile on. Prevent web clients from accessing htaccess files and backup files (~ so far).

 apache-httpd.conf | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
---
diff --git a/apache-httpd.conf b/apache-httpd.conf
index 613e533..2e73649 100644
--- a/apache-httpd.conf
+++ b/apache-httpd.conf
@@ -66,6 +66,28 @@ HostnameLookups Off
 
 TraceEnable Off
 
+#
+# EnableMMAP and EnableSendfile: On systems that support it, 
+# memory-mapping or the sendfile syscall may be 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.
+# Defaults if commented: EnableMMAP On, EnableSendfile Off
+#
+#EnableMMAP off
+EnableSendfile on
+
+# Prevent .htaccess and .htpasswd files from being viewed by Web clients. 
+<Files ".ht*">
+    Require all denied
+</Files>
+
+# Prevent backup files from being viewed, too.
+<Files "*~">
+    Require all denied
+</Files>
+
 # Include other modules and packages config.
 Include conf.d/*.conf
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache.git/commitdiff/11d294e5dbf87b90b7c424362ea628d80993ccc1



More information about the pld-cvs-commit mailing list