@jorisdrenth opened this Pull Request on March 24th 2021 Contributor


In Apache 2.4+, the syntax for access control has changed. This causes the cron script to return a 500 error when running on Apache 2.4+. This PR checks which version of Apache is used and uses the right syntax.

See also: https://httpd.apache.org/docs/2.4/upgrading.html


  • [ ] Functional review done
  • [ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • [ ] Security review done see checklist
  • [ ] Code review done
  • [x] Tests were added if useful/possible
  • [ ] Reviewed for breaking changes
  • [x] Developer changelog updated if needed
  • [x] Documentation added if needed
  • [x] Existing documentation updated if needed
@jorisdrenth commented on April 11th 2021 Contributor

Thanks for your comment @diosmosis. I've made the requested changes, also adding the <IfModule !mod_version.c> part which I found in the file you linked. I think this is the most consistent code I can make of it.

I've tested this version of the .htaccess and it works at my client's Matomo installation on our Apache 2.4 servers.

@diosmosis commented on April 11th 2021 Member

@jorisdrenth does the mod_version one alone not work for you?

@jorisdrenth commented on April 11th 2021 Contributor

@diosmosis No, it causes an Internal Server Error. mod_version is not available on our servers, that's why we always check for mod_authz_core.

In my opinion this is the best solution to the widest range of users. Also see the comment in the file you linked.

@diosmosis commented on April 11th 2021 Member

Hi @jorisdrenth, you're right, my glance at the file should have been more thorough. Thanks again for the contribution!

@jorisdrenth commented on April 11th 2021 Contributor

Np, thanks for accepting the PR @diosmosis!

This Pull Request was closed on April 11th 2021
Powered by GitHub Issue Mirror