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.
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.
Matomo loads very slow, resources (CSS, images) not getting loaded and nothing works. No errors in logs though.
Temporary workaround is to run the Matomo from different directory (/var/www/html). In this case Matomo works just fine.
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.
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.
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.