I have installed on a Windows 11 Magento using Xampp, Composer, Elastic Search. The installation went through without any errors. However, when I now go to the URL http://localhost/magento/pub/, I only get the image attached.
I then enabled the dev tools in the browser. The following errors are visible.
Do I need to install anything else or do any additional configuration? The directories shown in the error messages do not exist in the folder structure.
I then tried to implement the hint in article https://magento.stackexchange.com/questions/341849/magento-2-4-3-module-and-theme-installation-not-working
after that the following error appears during compilation:
In the meantime I found the solution for the compiler error at the following URL: https://mage2.pro/t/topic/6178/3. Now at least it runs through. But the errors still exist. The directories were generated now, but according to the DevTools in Edge the files should be in /versionxyz/frontend or /versionxyz/adminhtml. But this version folder does not exist and when I manually create it and copy the mentioned folders into it, it does not work either, although the path should be correct then.
Nobody has an idea?
2
Answers
You have to set the permissions to the pub folder of your Magento directory. Steps to reproduce:
Set the correct permission to pub, var and app/etc
Please run the following commands to set the permissions:
find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;
find ./var -type d -exec chmod 777 {} ;
find ./pub/media -type d -exec chmod 777 {} ;
find ./pub/static -type d -exec chmod 777 {} ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod u+x bin/Magento
Run the command again and check if its is work
Please ref: https://devdocs.magento.com/guides/v2.4/config-guide/prod/prod_file-sys-perms.html
this worked for me as the problem was that magento was looking inside my local machine and not the docker container.
php bin/magento setup:store-config:set --base-url='localhost:<port for magento container>'
php bin/magento cache:clean