I can not open the admin panel and get a 404.

The $this->_routerList does not contain the admin route.


Have a look at \Magento\Framework\App\Http::launch. There is a line

    $areaCode = $this->_areaList->getCodeByFrontName($this->_request->getFrontName());

which determines the area.

The admin route is only loaded, if the area is detected as adminhtml.

Digging down leads you to \Magento\Backend\App\Area\FrontNameResolver::isHostBackend

There is a check whether the current URL (unsecure URL or custom_admin_url) matches the current host.

In cases where this does not match (for example if behind a proxy), this might fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.