-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backend redirects to 404 #2278
Comments
I guess this is somehow related to |
Internally tracking - MAGETWO-45105 |
Can confirm this issue, and fixed it with following diff: diff --git app/code/Magento/Backend/App/Area/FrontNameResolver.php app/code/Magento/Backend/App/Area/FrontNameResolver.php
index ab4e9eb..a375fb4 100644
--- app/code/Magento/Backend/App/Area/FrontNameResolver.php
+++ app/code/Magento/Backend/App/Area/FrontNameResolver.php
@@ -85,7 +85,7 @@ class FrontNameResolver implements \Magento\Framework\App\Area\FrontNameResolver
{
$backendUrl = $this->configInterface->getValue(Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
$backendHost = parse_url(trim($backendUrl), PHP_URL_HOST);
- $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
+ $host = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
return (strcasecmp($backendHost, $host) === 0);
}
} |
Closing as duplicate of #2272 |
@Taral-Patoliya Please try again, this has been fixed in RC2. |
after installation magento2, it redirected me to 404, not open admin panel ? |
@100rabhMisra please do not comment on closed issues. Moreover, support questions should be asked on the Magento forums or at Magento SE. |
When I changes the port to 8080 from 80, and tried to access the backend, it redirected me to 404,
This is due to the isHostBackend() method in Magento\Backend\App\Area\FrontNameResolver
returns false,
The $backendHost and $_SERVER['HTTP_HOST']) are not the same.
The text was updated successfully, but these errors were encountered: