YunoHost-Apps / matomo_ynh

Matomo package for YunoHost
https://matomo.org/
GNU General Public License v3.0
18 stars 5 forks source link

Nginx.conf updates break 403 directories. #121

Open oXyiGYJ opened 1 month ago

oXyiGYJ commented 1 month ago

Describe the bug

Commit #119 allows access to /config/config.ini.php and /tmp/. The old syntax (I believe) is correct.

Context

I reinstalled Matomo earlier, however I tried to upgrade it first. It just stuck at loading to update it and never finished, refreshing shows that it is available for upgrade. This might be related to that? Sorry I do not have any logs.

Steps to reproduce

  1. Install the app
  2. Go to the System Check

Expected behavior

All green

I changed the following in matomo.conf and it got rid of all the errors about being able to access those files.

I removed all the separate locations to 403 and put them into one:

  ## disable all access to the following directories
  location ~ ^/(config|tmp|core|lang) { 
    deny all;
    return 403; # replace with 404 to not show these directories exist
  }

I changed location ~ [^/]\.php(/|$) { on line 18 to location ~ ^/(index|matomo|piwik|js/index|plugins/HeatmapSessionRecording/configs)\.php$ {