Required Private Directories (config.inc.php) since last update failing

Since the last update in Matomo, I’m now seeing a critical error about ‘Required Private Directories’ which is highlighting the /config/config.inc.php as the only problem file (see below):

You can see from the below green check that all private directories are inaccessible from the internet okay so it does appear to be something to do with just this one file.

This is was either fine before the update though or this was an additional check added to ‘System Check’ in the latest update.

I am running Matomo with PHP8 (only just upgraded from PHP7 after latest update also) running as FPM application served by Nginx.

I have read various steps and advice but not found a solution. Is there something that I need to add specifically for the config.inc.php file that is handled somewhere in the sample Matomo Nginx conf file?

Hi,

I think you can fix this thanks to .htaccess file:
https://httpd.apache.org/docs/current/howto/htaccess.html

.htaccess not in use though as running Nginx…

@zigojacko are you using this nginx config? https://github.com/matomo-org/matomo-nginx

When you open the URL directly in your browser is it accessible or does it result in an HTTP 403 error (or similar error)?

Looking at https://github.com/matomo-org/matomo-nginx/blob/5b232af8ec1fd9d033f1c4ab9343f4073df64644/sites-available/matomo.conf#L56 it does look like the config directory is blocked.

1 Like