@alexhass opened this Issue on September 22nd 2022

Looks like the htaccess has a bug and this takes down Matomo completly with a server 500 error.

Error is /.htaccess: 'ExpiresDefault 7200': bad expires code, unrecognised <base> '7200'

Expected Behavior

No error logged in apache logs

Current Behavior

An error is logged in apache logs for every request

Possible Solution

I guess the correct format is ExpiresDefault "A7200"

Steps to Reproduce (for Bugs)

  1. Open matomo index.php

Your Environment

  • Matomo Version: 4.10.0
  • PHP Version: 7.4-fpm
  • Server Operating System: Debian 11

Server version: Apache/2.4.54 (Debian)
Server built: 2022-06-09T04:26:43

@alexhass commented on September 22nd 2022

The old htaccess file seems working on Debian 9 for unknown reasons... that was also a Apache 2.4 with PHP7.3-fpm, but different build.

Server version: Apache/2.4.25 (Debian)
Server built: 2022-03-18T12:54:25

At least the bug has not caused a system down on old server. Nothing shows up on old apache in error.log. I guess Apache has fixed a bug in later build and is now nitpicking about the properly documented format.

@bx80 commented on September 22nd 2022 Contributor

Hi @alexhass, thanks for reporting this.

I can't find any reference to ExpiresDefault anywhere it in the current codebase. Could it have been added by a previous version or manually at some point?

@alexhass commented on September 23rd 2022

Hmmm... This is the .htaccess that is inside matomo root folder. I cannot remember that I created this file myself, but maybe it was done 10 or more years ago and I just forgotten about this. My internal long term documenation says nothing about this customization. But you make me thinking... there are some paths inside that are specific to me system, so maybe I created it. I will try to find an old piwik version to check if this was never included... in such case I need to fully review it - if this stuff is all current.

@alexhass commented on September 24th 2022

Not an issue of Matomo.

This Issue was closed on September 24th 2022
Powered by GitHub Issue Mirror