I am trying to install latest magento2 version(2.4.2) in localhost but it is returning the 404 error, magento 2 root folder xampp/htdocs/m3
1 Answers
As of Magento 2.4.2, the webserver must be configured to serve the requests from the <magento_root>/pub folder, in your case, for Apache, you will have to set the DocumentRoot like this (replace placeholder with your Magento location) DocumentRoot <magento_root>/pub.
Also, worth noting that Magento doesn't like having the application installed in a subfolder and accessed directly as you tried in your post. My suggestion is to create a dedicated virtual host and launch it from its dedicated location OR move the Magento install into the Apache launch folder directly. Point is, your webserver must be configured to launch the app from within <magento_root>/pub folder.
Read more details and ideas here frontend and admin not working magento 2.4.2 upgrade
Good Luck!
- 5,137
- 1
- 11
- 26
