Magento – 404 not found error for admin page

404-pageadminmagento2nginx

I installed Magento successfully, but the Admin page gives error: 404 not found. Please suggest a solution for this.

The following is the error:

404 Not Found

nginx/1.10.0 (Ubuntu)

Best Answer

For Linux edit the file /etc/apache2/apache2.conf

To edit this file use sudo vi /etc/apache2/apache2.conf command

<Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted
</Directory>

to

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

After this run command

sudo service apache2 restart

IF STILL ADMIN SHOW 404 NOT FOUND, FOLLOW THIS STEP

1) Add .htaccess at root of magento 2

https://github.com/magento/magento2/blob/2.3-develop/.htaccess

2) Now run this command

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

rm -rf var/cache/*

rm -rf var/generation/*

Related Topic