[zabbix20/el6] Update httpd configuration for Apache 2.4

Volker Fröhlich volter at fedoraproject.org
Tue Nov 13 21:48:39 UTC 2012


commit 3ab0dd56c4426bd493be16317f00bbc6714efc30
Author: Volker Fröhlich <volker27 at gmx.at>
Date:   Tue Nov 13 22:38:10 2012 +0100

    Update httpd configuration for Apache 2.4
    
    - Solving BZ#871498

 zabbix-web.conf |   58 +++++++++++++++++++++++++++---------------------------
 zabbix20.spec   |    5 +++-
 2 files changed, 33 insertions(+), 30 deletions(-)
---
diff --git a/zabbix-web.conf b/zabbix-web.conf
index f784ed8..4e4e237 100644
--- a/zabbix-web.conf
+++ b/zabbix-web.conf
@@ -7,42 +7,42 @@ Alias /zabbix /usr/share/zabbix
 <Directory "/usr/share/zabbix">
     Options FollowSymLinks
     AllowOverride None
-    Order allow,deny
-    Allow from all
-</Directory>
 
-<Directory "/usr/share/zabbix/conf">
-    Order deny,allow
-    Deny from all
-    <files *.php>
-        Order deny,allow
-        Deny from all
-    </files>
-</Directory>
+    <IfModule mod_authz_core.c>
+      # Apache 2.4
+      Require all granted
+    </IfModule>
+   
+    <IfModule !mod_authz_core.c>
+      # Apache 2.2
+      Order allow,deny
+      Allow from all
+    </IfModule>
 
-<Directory "/usr/share/zabbix/api">
-    Order deny,allow
-    Deny from all
-    <files *.php>
-        Order deny,allow
-        Deny from all
-    </files>
 </Directory>
 
-<Directory "/usr/share/zabbix/include">
-    Order deny,allow
-    Deny from all
-    <files *.php>
-        Order deny,allow
-        Deny from all
-    </files>
-</Directory>
+<Directory ~ "^/usr/share/zabbix/(conf|api|include)/">
+    <IfModule mod_authz_core.c>
+      # Apache 2.4
+      Require all denied
+    </IfModule>
+
+    <IfModule !mod_authz_core.c>
+      # Apache 2.2
+      Order deny,allow
+      Deny from all
+    </IfModule>
 
-<Directory "/usr/share/zabbix/include/classes">
-    Order deny,allow
-    Deny from all
     <files *.php>
+      <IfModule mod_authz_core.c>
+        # Apache 2.4
+        Require all denied
+      </IfModule>
+
+      <IfModule !mod_authz_core.c>
         Order deny,allow
         Deny from all
+      </IfModule>
+
     </files>
 </Directory>
diff --git a/zabbix20.spec b/zabbix20.spec
index a3bfaed..6838988 100644
--- a/zabbix20.spec
+++ b/zabbix20.spec
@@ -36,7 +36,7 @@
 
 Name:           zabbix20
 Version:        2.0.3
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Open-source monitoring solution for your IT infrastructure
 
 Group:          Applications/Internet
@@ -849,6 +849,9 @@ fi
 %files web-pgsql
 
 %changelog
+* Tue Nov 13 2012 Volker Fröhlich <volker27 at gmx.at> - 2.0.3-5
+- Adapt httpd configuration file for Apache 2.4 (BZ#871498)
+
 * Thu Nov  8 2012 Volker Fröhlich <volker27 at gmx.at> - 2.0.3-4
 - Require php explicitly again
 - Remove traces of /usr/local in configuration files


More information about the scm-commits mailing list