0

I installed Magento 2.4.2 successfully, but after installation home page gives error: 404 not found. Please suggest a solution for this.

I have used PHP -7.4 Mysql - 8.0 Nginx 1.18.0

The following is the error

404 Not Found
nginx/1.18.0 (Ubuntu)
2
0

The problem you are encountering is due to the change brought in 2.4.2 where the website pages are now served from the /pub folder. So you need to update your configurations to point to that location.

  1. Check https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html and follow all steps presented there (magento base urls, webserver settings, env.file, etc).
  2. For nginx, just follow the https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html#a-note-about-nginx guide, your document root should be set to <magento_proj_folder>/pub. This should do it :)

good luck!

1
  • I tried as per above document however, I am getting the same 404 not found. Aug 21 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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