@harripaalanen opened this Issue on February 9th 2022

We are having problems running Matomo 4.6.2 in Azure App Service (Linux based) with PHP 8 and Nginx server. If we run Matomo from the App Service's /home/site/wwwroot/ directory the problems occurs. If we copy the Matomo files over to different directory (/var/www/html owned by the same user running the Nginx) it works just fine. /home directory should be used for apps deployed in App Service.

Is this some kind of permission issue? It is not possible to modify /home permission in Azure App Service. We used https://github.com/matomo-org/matomo-nginx as base config for our Nginx configuration.

Expected Behavior

Matomo works with the Azure App Service + PHP8 + Nginx combination as it is working with Azure App Service with PHP7 and Apache from the default App Service directory.

Current Behavior

Matomo loads very slow, resources (CSS, images) not getting loaded and nothing works. No errors in logs though.

Possible Solution

Temporary workaround is to run the Matomo from different directory (/var/www/html). In this case Matomo works just fine.

Steps to Reproduce (for Bugs)

  1. Set up an Azure Linux-based App Service with PHP8 and Nginx and deploy Matomo
  2. Use Nginx config from https://github.com/matomo-org/matomo-nginx

Context

Your Environment

  • Matomo Version: 4.6.2
  • PHP Version: 8.0.11
  • Server Operating System: Azure App Service (Linux)
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@sgiehl commented on February 9th 2022 Member

Hi @harripaalanen. Thanks for creating the issue. To me this more likely sounds like a webserver configuration issue.
What exactly is the cause for css and images no being loaded? Are the the requests maybe returning a 404? Maybe the user running ngnix didn't have permission to access all files in the Matomo directly and thus couldn't deliver them. Or some kind of webserver configuration prevented the access.

@harripaalanen commented on February 9th 2022

Yeah, it might be a configuration issue but the strange thing is that exactly the same webserver configuration works with different document root. And the two documents roots have equal contents. Only difference seems to be the permission stuff which we cannot control.

@sgiehl commented on February 9th 2022 Member

Do the matomo files have read/write permission for the user nginx is running with? At least the tmp and misrc directory of Matomo needs to be writable, otherwise it might be broken.

Powered by GitHub Issue Mirror