Skip to content
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

.htaccess files Apache 2.4 compatibility update #64

Merged
merged 1 commit into from Feb 15, 2017
Merged

.htaccess files Apache 2.4 compatibility update #64

merged 1 commit into from Feb 15, 2017

Conversation

dregad
Copy link
Contributor

@dregad dregad commented Jan 13, 2017

The .htaccess files used to restrict access to specific directories
follow the Apache 2.2 mod_authz_host module syntax [1] (Order, Allow,
Deny).

Apache 2.4 introduced a new module mod_authz_core [2], with a different,
incompatible directive (Require). Consequently, unless the compatibility
module access_compat is enabled, the obsolete ones will cause Apache
configuration errors to occur when the .htaccess file is read.

To avoid this, the .htaccess files are modified to use the new syntax
when an Apache 2.4 server is detected, and fall back to the old
directives otherwise.

[1] https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
[2] https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html

The .htaccess files used to restrict access to specific directories
follow the Apache 2.2 mod_authz_host module syntax [1] (Order, Allow,
Deny).

Apache 2.4 introduced a new module mod_authz_core [2], with a different,
incompatible directive (Require). Consequently, unless the compatibility
module access_compat is enabled, the obsolete ones will cause Apache
configuration errors to occur when the .htaccess file is read.

To avoid this, the .htaccess files are modified to use the new syntax
when an Apache 2.4 server is detected, and fall back to the old
directives otherwise.

[1] https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
[2] https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html
@dapphp
Copy link
Owner

dapphp commented Feb 15, 2017

Thanks for spotting that and providing the fix. Looks good, even compatible with Apache 1.3. Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants