0

I run the below commands. after that in the terminal, Magento commands run well but on the other end, it's given me a 404 Not Found error in the browser frontend and backend.

composer require magento/product-community-edition 2.4.4 --no-update

composer update --ignore-platform-reqs

php bin/magento s:up

php bin/magento s:s:d -f

php bin/magento s:d:c

php bin/magento in:rein

php bin/magento c:c

enter image description here

404 Not Found: https://prnt.sc/uDcoYMkJPdro

And URL path is already set proper in core_config_data table: https://prnt.sc/oMATtMkqsojb

How to solve this? Anyone can help me?

4
  • try adding pub at the end of the base_url like this localhost/m24data/pub
    – Pramod
    Commented Apr 30, 2022 at 13:23
  • is it be 1)composer require magento/product-community-edition 2.4.4 --no-update 2) composer update command run successfully?
    – S.P
    Commented May 2, 2022 at 5:18
  • Yes @S.P it's run perfectly.
    – Msquare
    Commented May 2, 2022 at 9:36
  • You had already created virtual host for your side right?
    – S.P
    Commented May 2, 2022 at 9:40

3 Answers 3

0

Did you start elasticsearch, setup 2FA? https://devdocs.magento.com/guides/v2.4/security/two-factor-authentication.html#magento-functional-testing-framework

Did you check cookie domain in core_config_data table?

1
  • elasticsearch service is running well and 2FA is disabled for now. In core_config_data each entry is proper.
    – Msquare
    Commented Jun 2, 2022 at 16:05
-1

you can add pub at the end of the base_url Secure and unsecure http://127.0.0.1/m24data/pub/

OR

You can use virtual host so no needed the add pub in base URL.

Follow this URL for create virtual host for ubuntu

https://programmingfields.com/how-to-create-virtual-host-ubuntu-20-04-for-apache-server/

After added the pub run below all command

sudo rm -rf pub/static/frontend rm -rf pub/static/adminhtml rm -rf pub/static/_cache rm -rf var/cache rm -rf var/composer_home rm -rf var/generation rm -rf var/generated rm -rf var/page_cache rm -rf var/view_preprocessed rm -rf var/log rm -rf var/report rm -rf generated/code/ rm -rf generated/metadata/

php bin/magento maintenance:enable
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento setup:static-content:deploy
php bin/magento maintenance:disable
php bin/magento cache:flush
php bin/magento indexer:reindex
sudo chmod -R 777 var/ generated/ pub/media/ pub/static/
3
  • It's we do not use a virtual host. After adding the pub run Magento command nothing is working. same 404 page not found
    – Msquare
    Commented May 2, 2022 at 5:00
  • See the updated the answer and it's working fine. Commented May 2, 2022 at 5:06
  • after running all commands nothing is solved.
    – Msquare
    Commented May 2, 2022 at 14:57
-1

Try adding pub at the end of the base_url like this http://localhost/m24data/pub

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.