My general customer view frontend is working fine.
But when I tried to login into the admin area , then
I enter this in address of chrome web browser -
http://127.0.0.1/local_m241/lcl_m241/index.php/admin_17r9pn
Then got auto-redirected to this -
http://127.0.0.1/local_m241/lcl_m241/admin_17r9pn/admin/index/index/key/6a5ef2a519b65baf9f4c74860c9e7a6a45ae537c24a35f1e77683f5cf0f4f5d1/
and this page shows 404 error as shown in below picture.
-
I am using apache2– Vibhore JainMay 22, 2021 at 18:36
-
can you try this url :- 127.0.0.1/local_m241/lcl_m241/pub/index.php/admin_17r9pn– Mohit PatelMay 22, 2021 at 18:37
-
It also redirected to the same page but with only key value changed to 127.0.0.1/local_m241/lcl_m241/admin_17r9pn/admin/index/index/… and still 404 error.. I think it may linked with url_rewrite of apache2 , but i am not sure.– Vibhore JainMay 22, 2021 at 18:41
-
you can try change admin url :- magento.stackexchange.com/a/113753/85907– Mohit PatelMay 22, 2021 at 18:48
-
Successfully changed the admin url path but it also redirect to 404 page..– Vibhore JainMay 22, 2021 at 19:13
1 Answer
Reference tutorial that helped me in solving this problem is
https://magecomp.com/blog/fix-404-error-page-not-found-admin-url-magento-2/
Here Solution number 2 worked for me - Enable Rewrite mode of apache2.
Steps are -
sudo a2enmod rewrite
For Ubuntu / Debian edit the file /etc/apache2/apache2.conf. To edit this file run command
sudo vi /etc/apache2/apache2.conf
Modify from
<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>
Then restart apache
sudo service apache2 restart
or
sudo /etc/init.d/apache2 restart
or
sudo systemctl restart apache2
And it worked fine for me :)