I had the same issue. I had to enable the mod_rewrite
module and set the AllowOverride
to all
for /var/www/html
directory in the apache configuration file.
Magento 2 404 error admin panel
-
23-03-2022 - |
Question
Recently I installed Magento ver 2.0
After successfull installation, I tried to login to admin panel but it say 404 not found.
I am really not getting what is causing such issue. Moreover from the URL it can seen that I am logged into admin oanel but the dashboards is not visible.
Can anyone shed some light on this ?
No correct solution
OTHER TIPS
Maybe a known issue? Some info regarding a work around currently as well.
https://github.com/magento/magento2/issues/254
According to that, this may fix it:
Quick fix: in app/code/Mage/Install/Model/Installer/Db.php:64 paste following
if($extName == 0) {
continue;
}
after
foreach ($extensions as $extName) {
The problem is in getting of REQUEST_URI environment variable value and checking it withSCRIPT_FILENAME and SCRIPT_NAME environment variables values.
So a cause of the problem is in adding of /index.php/ prefix to the request path and the Magento url generation has this value hardcoded for admin.
Override method called _updatePathUseRewrites in /app/code/core/Mage/Core/Mode/store.php file : Replace this Function:
protected function _updatePathUseRewrites($url)
{
if ($this->isAdmin() || !$this->getConfig(self::XML_PATH_USE_REWRITES) || !Mage::isInstalled()) {
$url .= basename($_SERVER['SCRIPT_FILENAME']).'/'; }
return $url;
}
with
protected function _updatePathUseRewrites($url)
{
if ($this->isAdmin() || !$this->getConfig(self::XML_PATH_USE_REWRITES) || !Mage::isInstalled()) {
$url .= '/'; }
return $url;
}
This will definitely solve your Problem