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
    --admin-email=admin@admin.com
    --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,

Priya
  • 325
  • 1
  • 2
  • 13

1 Answers1

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.

Diana
  • 5,137
  • 1
  • 11
  • 26
  • 1
    I tried the below link. It worked for me.https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html – Priya Mar 03 '21 at 06:36
  • magento 2.4 doesn't have the index.php file in the root folder. It's only in pub/ folder. – obsergiu Mar 04 '21 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 Mar 04 '21 at 12:05