[cacti] Adjust ACLs to support httpd 2.4.

Ken Dreyer ktdreyer at fedoraproject.org
Tue Mar 27 02:14:58 UTC 2012


commit 596e3b76f58b5e7e067dd5ed3b8dba45abf5e876
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Mon Mar 26 20:14:52 2012 -0600

    Adjust ACLs to support httpd 2.4.

 cacti-httpd.conf |   41 +++++++++++++++++++++++++++++------------
 cacti.spec       |    5 ++++-
 2 files changed, 33 insertions(+), 13 deletions(-)
---
diff --git a/cacti-httpd.conf b/cacti-httpd.conf
index e888f31..d3242d4 100644
--- a/cacti-httpd.conf
+++ b/cacti-httpd.conf
@@ -2,15 +2,22 @@
 # Cacti: An rrd based graphing tool
 #
 
-# Change "Allow from 127.0.0.1" to open up cacti to other network devices.
-# For example, change "Allow from 127.0.0.1" to "Allow from all".
+# Change the following ACLs to open up Cacti to other network devices.
+# For example:
+# On httpd 2.4, change "Require host localhost" to "Require all granted".
+# On httpd 2.2, change "Allow from localhost" to "Allow from all".
 
 Alias /cacti    /usr/share/cacti
 
 <Directory /usr/share/cacti/>
-	Order Deny,Allow
-	Deny from all
-	Allow from 127.0.0.1
+	<IfVersion > 2.2>
+		Require host localhost
+	</IfVersion>
+	<IfVersion <= 2.2>
+		Order deny,allow
+		Deny from all
+		Allow from localhost
+	</IfVersion>
 </Directory>
 
 <Directory /usr/share/cacti/install>
@@ -23,14 +30,24 @@ Alias /cacti    /usr/share/cacti
 </Directory>
 
 
-# The sections marked "deny from all" should not be modified.
-# These are in place in order to harden cacti.
+# These sections marked "Require all denied" (or "deny from all")
+# should not be modified.
+# These are in place in order to harden Cacti.
 <Directory /usr/share/cacti/log>
-    order deny,allow
-    Deny from all
+	<IfVersion > 2.2>
+		Require all denied
+	</IfVersion>
+	<IfVersion <= 2.2>
+		Order deny,allow
+		Deny from all
+	</IfVersion>
 </Directory>
 <Directory /usr/share/cacti/rra>
-    order deny,allow
-    Deny from all
+	<IfVersion > 2.2>
+		Require all denied
+	</IfVersion>
+	<IfVersion <= 2.2>
+		Order deny,allow
+		Deny from all
+	</IfVersion>
 </Directory>
-
diff --git a/cacti.spec b/cacti.spec
index d48bc90..49863a9 100644
--- a/cacti.spec
+++ b/cacti.spec
@@ -1,6 +1,6 @@
 Name: cacti
 Version: 0.8.7i
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: An rrd based graphing tool
 
 Group: Applications/System
@@ -114,6 +114,9 @@ fi
 %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib
 
 %changelog
+* Mon Mar 26 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.8.7i-4
+- Adjust ACLs to support httpd 2.4.
+
 * Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.7i-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list