Your software
My Mautic version is: 5.2.x series
My PHP version is: 8.1.0
My Database type and version is: MySQL
Your problem
My problem is: index.php/installer 404
These errors are showing in the log:
2024/12/09 01:59:19 [error] 61820#61820: *46 FastCGI sent in stderr: “PHP message: PHP Warning - file_put_contents(/var/www/html/var/cache/prod/middlewares.cache.php): Failed to open stream: Permission denied - in file /var/www/html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php - at line 70PHP message: PHP Warning: file_put_contents(/var/www/html/var/cache/prod/middlewares.cache.php): Failed to open stream: Permission denied in /var/www/html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php on line 70PHP message: PHP Warning - include(/var/www/html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory - in file /var/www/html/app/middlewares/MiddlewareBuilder.php - at line 66PHP message: PHP Warning: include(/var/www/html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory in /var/www/html/app/middlewares/MiddlewareBuilder.php on line 66PHP message: PHP Warning - include(): Failed opening ‘/var/www/html/var/cache/prod/middlewares.cache.php’ for inclusion (include_path=‘.:/usr/share/php’) - in file /var/www/html/app/middlewares/MiddlewareBuilder.php - at line 66PHP message: PHP Warning: include(): Failed opening ‘/var/www/html/var/cache/prod/middlewares.cache.php’ for inclusion (include_path=‘.:/usr/share/php’) in /var/www/html/app/middlewares/MiddlewareBuilder.php on line 66PHP message: PHP Warning - foreach() argument must be of type array|object, bool given - in file /var/www/html/app/middlewares/MiddlewareBuilder.php - at line 68PHP message: PHP Warning: foreach() argument must be of type array|object, bool given in /var/www/html/app/middlewares/MiddlewareBuilder.php on line 68” while reading response header from upstream, client: 192.168.100.1, server: _, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php8.1-fpm.sock:”, host: “192.168.100.198”
administrator@mailserver:~$ ls -l /var/www/html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php
-rw-r–r-- 1 administrator www-data 2808 Dec 2 19:52 /var/www/html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php
administrator@mailserver:~$ ls -l /var/www/html/var/cache/prod/middlewares.cache.php
-rw-r–r-- 1 www-data www-data 267 Dec 9 02:06 /var/www/html/var/cache/prod/middlewares.cache.php
Steps I have tried to fix the problem:
wget https://github.com/mautic/mautic/releases/download/5.2.0/5.2.0.zip
sudo unzip 5.2.0.zip -d /var/www/html/
sudo chown -R administrator:www-data /var/www/html
composer update
composer install --no-dev --optimize-autoloader