[zikula] fix configuration file for httpd 2.4, #871501
Remi Collet
remi at fedoraproject.org
Fri Jan 4 18:10:32 UTC 2013
commit 034c447ae555ed5536e8760ef985773ac533bf6f
Author: Remi Collet <remi at fedoraproject.org>
Date: Fri Jan 4 19:10:24 2013 +0100
fix configuration file for httpd 2.4, #871501
zikula.conf | 126 ++++++++++++++++++++++++++++++++++++++++-------------------
zikula.spec | 5 ++-
2 files changed, 90 insertions(+), 41 deletions(-)
---
diff --git a/zikula.conf b/zikula.conf
index 1a84986..516376b 100644
--- a/zikula.conf
+++ b/zikula.conf
@@ -1,10 +1,19 @@
#conf file for dedicated server installs of Zikula.
# v0.1 David Nalley <david at gnsa.us> - Initial consolidation of .htaccess files from Zikulasource
+# v0.2 Remi Collet <rcollet at redhat.com> - httpd 2.2/2.4 compatibility
#
Alias /zikula /usr/share/zikula
<Directory /usr/share/zikula/>
- order deny,allow
- allow from all
+ php_flag display_errors Off
+
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require all granted
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ order deny,allow
+ allow from all
+ </IfModule>
</Directory>
<Directory /usr/share/zikula/install/>
@@ -15,14 +24,20 @@ Alias /zikula /usr/share/zikula
SetEnvIf Request_URI "\.gif$" object_is_gif=gif
SetEnvIf Request_URI "\.png$" object_is_png=png
SetEnvIf Request_URI "\.tif$" object_is_tif=tif
- Order deny,allow
- Deny from all
- Allow from env=object_is_css
- Allow from env=object_is_js
- Allow from env=object_is_jpg
- Allow from env=object_is_gif
- Allow from env=object_is_png
- Allow from env=object_is_tif
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_css object_is_js object_is_jpg object_is_gif object_is_png object_is_tif
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order deny,allow
+ Deny from all
+ Allow from env=object_is_css
+ Allow from env=object_is_js
+ Allow from env=object_is_jpg
+ Allow from env=object_is_gif
+ Allow from env=object_is_png
+ Allow from env=object_is_tif
+ </IfModule>
</Directory>
<Directory /usr/share/zikula/system/>
@@ -34,15 +49,21 @@ Alias /zikula /usr/share/zikula
SetEnvIf Request_URI "\.png$" object_is_png=png
SetEnvIf Request_URI "\.tif$" object_is_tif=tif
SetEnvIf Request_URI "\.swf$" object_is_swf=swf
- Order deny,allow
- Deny from all
- Allow from env=object_is_css
- Allow from env=object_is_js
- Allow from env=object_is_jpg
- Allow from env=object_is_gif
- Allow from env=object_is_png
- Allow from env=object_is_tif
- Allow from env=object_is_swf
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_css object_is_js object_is_jpg object_is_gif object_is_png object_is_tif object_is_swf
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order deny,allow
+ Deny from all
+ Allow from env=object_is_css
+ Allow from env=object_is_js
+ Allow from env=object_is_jpg
+ Allow from env=object_is_gif
+ Allow from env=object_is_png
+ Allow from env=object_is_tif
+ Allow from env=object_is_swf
+ </IfModule>
</Directory>
<Directory /usr/share/zikula/modules/>
@@ -56,47 +77,72 @@ Alias /zikula /usr/share/zikula
SetEnvIf Request_URI "\.swf$" object_is_swf=swf
SetEnvIf Request_URI "\.flv$" object_is_flv=flv
SetEnvIf Request_URI "\.ico$" object_is_ico=ico
- Order deny,allow
- Deny from all
- Allow from env=object_is_css
- Allow from env=object_is_js
- Allow from env=object_is_jpg
- Allow from env=object_is_gif
- Allow from env=object_is_png
- Allow from env=object_is_tif
- Allow from env=object_is_swf
- Allow from env=object_is_flv
- Allow from env=object_is_ico
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_css object_is_js object_is_jpg object_is_gif object_is_png object_is_tif object_is_swf object_is_flv object_is_ico
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order deny,allow
+ Deny from all
+ Allow from env=object_is_css
+ Allow from env=object_is_js
+ Allow from env=object_is_jpg
+ Allow from env=object_is_gif
+ Allow from env=object_is_png
+ Allow from env=object_is_tif
+ Allow from env=object_is_swf
+ Allow from env=object_is_flv
+ Allow from env=object_is_ico
+ </IfModule>
</Directory>
<Directory /usr/share/zikula/config/>
- Options -Indexes
+ Options -Indexes
SetEnvIf Request_URI "\.css$" object_is_css=css
SetEnvIf Request_URI "\.js$" object_is_js=js
- Order deny,allow
- Deny from all
- Allow from env=object_is_css
- Allow from env=object_is_js
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_css object_is_js
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order deny,allow
+ Deny from all
+ Allow from env=object_is_css
+ Allow from env=object_is_js
+ </IfModule>
</Directory>
<Directory /usr/share/zikula/includes/>
Options -Indexes
Order deny,allow
+ # Works with Apache 2.2 or 2.4 (mod_access_compat)
Deny from all
</Directory>
<Directory /usr/share/zikula/system/Theme/pnincludes/>
Options -Indexes
SetEnvIf Request_URI "\.html$" object_is_html=html
- Allow from env=object_is_html
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_html
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Allow from env=object_is_html
+ </IfModule>
</Directory>
<Directory /var/lib/zikula/pnTemp/>
Options -Indexes
SetEnvIf Request_URI "\.css$" object_is_css=css
SetEnvIf Request_URI "\.js$" object_is_js=js
- Order deny,allow
- Deny from all
- Allow from env=object_is_css
- Allow from env=object_is_js
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require env object_is_css object_is_js
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order deny,allow
+ Deny from all
+ Allow from env=object_is_css
+ Allow from env=object_is_js
+ </IfModule>
</Directory>
diff --git a/zikula.spec b/zikula.spec
index 5bfe8fe..e8c6ec7 100644
--- a/zikula.spec
+++ b/zikula.spec
@@ -1,6 +1,6 @@
Name: zikula
Version: 1.2.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Zikula is a free open source Web Application Framework
Group: Applications/Publishing
License: GPLv2+
@@ -124,6 +124,9 @@ symlinks -crs /usr/share/zikula/includes/ > /dev/null 2>&1 || :
symlinks -crs /usr/share/zikula > /dev/null 2>&1 || :
%changelog
+* Fri Dec 4 2013 Remi Collet <rcollet at redhat.com> - 1.2.3-5
+- fix configuration file for httpd 2.4, #871501
+
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list