Skip to content

Magento's .htaccess files will not work with Apache 2.4 #1491

Closed
@ToonSpin

Description

@ToonSpin

In the Magento 2 readme, Apache 2.4 is said to be compatible with Magento, but this is not in fact the case. The Order [...] and Allow from [...] and Deny from [...] directives have been replaced by Require directives in Apache 2.4, and the old directives are silently ignored. None of the 14 .htaccess files in the Magento 2 repository that implement the 2.2 directives, implement the 2.4 directives.

This leaves folders you're trying to protect (e.g. app, bin, dev, media/customer, media/import), open for the wide world to access on servers that run Apache 2.4, such as Debian 8 "Jessie", Ubuntu 14.04 LTS, and CentOS 7.

The problem is that the new directives cause 2.2 to error out, which means that to support both, you need to use <IfVersion> directives, but those require an Apache module, and I don't think that this module is enabled by default.

In any case, I feel that the Magento team and Magento developers should be aware of this, so I thought I'd bring it to your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions