0

I am trying to install Magento2.4.2 . My system requirements seems fine. Installed PHP7.4 , Mysql 10, Elastic search 7.

And also I have ran this command first:

  1. sudo composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2/
  2. bin/magento setup:install
    --base-url=http://localhost/magento2
    --db-host=localhost
    --db-name=m242
    --db-user=sammy
    --db-password=Admin@123
    --admin-firstname=admin
    --admin-lastname=admin
    [email protected]
    --admin-user=admin
    --admin-password=reset@123
    --language=en_US
    --currency=USD
    --timezone=America/Chicago
    --use-rewrites=1
  3. Reindex 4.deploy 5.compile 6.upgrade 7.cache clean
  4. permisson

And while running the site am getting the 404 error issue.

http://localhost/magento2

can some one please help me to get rid of this issue..

Thanks,

1
  • Try to change the htaccess on /app folder or delete that to run the project on localhost.
    – sonu devda
    Commented Mar 2, 2021 at 12:15

1 Answer 1

3

Check that your webserver serves the requests from the proper location. it should be referencing the <magento_proj_root>/pub folder as Document Root.

https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html

Details here as I discussed with someone else who had the same issue.

3
  • 1
    I tried the below link. It worked for me.devdocs.magento.com/guides/v2.4/install-gde/tutorials/…
    – Priya
    Commented Mar 3, 2021 at 6:36
  • magento 2.4 doesn't have the index.php file in the root folder. It's only in pub/ folder.
    – obsergiu
    Commented Mar 4, 2021 at 11:23
  • i would suggest that it is best if the setup is done with the requests served from /pub folder and not from the project root in order to increase the security of the website.
    – Diana
    Commented Mar 4, 2021 at 12:05

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.