cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 404 error when accessing admin page

SOLVED

Getting 404 error when accessing admin page

magento 2.2.2

php 7.1

 

I made a copy of a working magento installation and put it into a subdomain. I want to create a staging environment where I can test deploying security patches and perform other updates before I deploy it to live

 

what I did:

I copied database and copied the files...

in core_config_data I chaned url and secured url

in app\etc\env.php I changed database connection

 

cleaned the cache

php bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/generation/*

 

Reindexed database

 

Banging my head against the wall a few times while I googled this issue

 

I found this link but the .htacess file gave internal server error, think because it was for php 5

 

any suggestions?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Getting 404 error when accessing admin page

Hi @Loginname

 

Glad to know that its working for you now !

 

well there are multiple reasons behind this kind of error - including the one you have posted which is - In the core_config_data table  set "web/seo/use_rewrites" = 0

 

Second reason - make sure you have .htaccess file is in your root directory of magento !

 

Third reason - make sure URL rewrite mode is enabled on your server.

 

sometimes due to misconfiguration of server also cause this kind of issue !

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

4 REPLIES 4

Re: Getting 404 error when accessing admin page

Hi @Loginname

 

Just copy pub/.htaccess to magento root folder ^_^

 

 

 

Problem solved? Click Kudos & Accept as Solution!

Re: Getting 404 error when accessing admin page

Hello @Loginname,

 

In developer mode, the files are automatically generated when requested and not found. So this should not be a Problem.

 

When facing a 500 error the first thing you should do is search for your web server error log.

When running on apache it can mostly be found in one of these 2 locations:

 

/var/log/httpd/error.log -> centos, archlinux ...
/var/log/apache2/error.log -> debian, ubuntu / apache server
/var/log/nginx/error.log -> debian, ubuntu / nginx server

Please share the error log so we can help to resolve an error. 

 

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Getting 404 error when accessing admin page

It seems to be working now

 

In the core_config_data table I set "web/seo/use_rewrites" = 0

 

With "seems to be wokring", I don't know about any hidden issue I might find later

Re: Getting 404 error when accessing admin page

Hi @Loginname

 

Glad to know that its working for you now !

 

well there are multiple reasons behind this kind of error - including the one you have posted which is - In the core_config_data table  set "web/seo/use_rewrites" = 0

 

Second reason - make sure you have .htaccess file is in your root directory of magento !

 

Third reason - make sure URL rewrite mode is enabled on your server.

 

sometimes due to misconfiguration of server also cause this kind of issue !

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution