-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compatibility for apache 2.4 out of the box #5
Conversation
Using .htaccess as is on Apache 2.4 make it halt with error 500 because `Order` directive is deprecated in favour of `Require`. This patch check esistence of `mod_authz_host` module, available in Apache 2.3 and later and uses the right directive supported by Apache
@endelwar the solution won't work for both Apache v2.2.x and v2.4.x because Apache 2.2.x has the Also relevant to this issue: http://httpd.apache.org/docs/trunk/upgrading.html#access |
mod_version should be compiled statically in major distribution and it is available from Apache version 2.0.56
@alrra yes, that's right, same module name, different functions :( |
mod_authz_core.c is only available on Apache >= 2.3
Eventually we can check for |
@endelwar yes, that seems to be a better solution as
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule> Tested the above in Apache/2.2.24 and Apache/2.4.6. @endelwar can you merge the commits into one and provide a more detail commit message ? Thanks! |
As of Apache v2.3, the `Order`, `Allow` & `Deny` directives are replaced by `Require`, making the Apache v2.2.x configuration not compatible with Apache v2.3+: http://httpd.apache.org/docs/trunk/upgrading.html#access. This patch enables the correct syntax for both Apache v2.2.x & v2.3+, by checking for the presence of the `mod_authz_core` base module (available only in Apache v2.3 and later). See also: http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html Close #5 and #6.
@endelwar thanks! |
Using .htaccess as is on Apache 2.4 make it halt with error 500 because
Order
directive is deprecated in favour ofRequire
.This patch checks existence of
mod_authz_host
module, available in Apache 2.3 and later and uses the right directive supported by Apache