404 not found error for admin page

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)

Solutions

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/*

Please try Below steps

  1. Delete var/cache folder
  2. Go to database SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites' and make it 0
  3. Then enter url in your browser magento_base_url/index.php/your_admin_url

try and let me know if you face any issue.

I also had this issue, it turned out one of my URLs was set to the IP address and not to the domain name so going to the {domain}/admin was returning not found.

Solution was to run

php bin/magento config:set web/secure/base_url https://domain.com/
php bin/magento config:set web/unsecure/base_url https://domain.com/

Don't forget the trailing slash, it will not work without it https://alanstorm.com/invalid-base-url-value-must-be-a-url-or-one-of/

Tags: Magento 2.x / Admin / Nginx

Similar questions

While creating custom grid in magento 2 error showing 404 Error Page not found.Actually i following mageplaza tutorial here
Here I am using mageplaza link ie https://www.mageplaza.com/magento-2-module-development/create-admin-grid-magento-2.html Actually i copied whole content as it is including model as well.but its showing error only 404 Error Page not found.
404 page not found error. Custom Page
I am trying to create custom page page having error 404. routes.xml Controller :- Layout file (hello_test_displayinfo):- Block file:- Employee.phtml:-
All of the buttons/links including admin login shows error 404 not found 1, how to fix this problem?
My web store is not responding at all. All the buttons, footer links, header links, categories show error 404 upon clicking. The theme of the store also appears as list view and I can not even login to my admin page as it shows error 404 not found 1.
Extension Admin page "404 not found"
Installed update for an extension (EmailDirect, after running patch 6788) successfully on local environment, but when uploaded to testing server it throws a "404 page not found". I even reinstalled a local copy from GIT, so both local and testing servers have the same code. Flushed cache several times and nothing, keeps missing the page only on tes...
Admin page not found - 404
I just installed Magento 2, it shown the success page result however the admin folder is not found. Also the main page does not seem to be ok, seems like css is not in place, there is no menu... just their text and images. Didn't find any error message. Any idea? Thanks!
Magento 2 After updating the admin URL getting 404 Not found page
I have changed the admin URL using the below command line: I have followed the below answer for change the admin URL: How to change magento2 admin url? After that I have gone to check the admin URL stored correct or not in this file app/etc/env.php . Also, I have run these commands after update the URL The URL has changed as expected but now I am g...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.