Вопрос

I am using below configuration :

Magento 2.4.x

PHP 7.4

Composer 2.0

Frontend and Backend is not working. All .htaccess files are there in required folder.

But still,I am getting below log in apache

GET /magento2/static/version1619677973/frontend/Magento/luma/en_US/Magento_Theme/favicon.ico HTTP/1.1" 404 39962 "http://127.0.0.1/magento2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36"
OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.41 (Ubuntu) (internal dummy connection)"
GET /favicon.ico HTTP/1.1" 404 488 "http://127.0.0.1/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36"

enter image description here

Also notice in console that, pub folder is not considered.

Need Help.

Это было полезно?

Решение

Insert the below four rows in the core_config_data table

Path Value
web/secure/base_static_url {{store_url}}/pub/static/
web/unsecure/base_static_url {{store_url}}/pub/static/
web/secure/base_media_url {{store_url}}/m242/pub/media/
web/unsecure/base_media_url {{store_url}}/pub/media/

php bin/magento cache:flush

Другие советы

Make sure your webserver uses as document root the <magento_folder>/pub folder when serving the requests.

See frontend and admin not working magento 2.4.2 upgrade for more details on how to solve this.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top