I was working on the backend of our Magento 2 server and was trying to adjust the layout of our home page. I'm now at a point where it gets stuck loading the admin panel and when I try to navigate through the menus I am transported back to the login page. I am getting this error when it happens

[access_compat:error] [pid 30135:tid 140617489147648] [client ***.***.***.***:0] AH01797: client denied by server configuration: /home/a7cf7ac0/****.***web host***.net/html/pub/.well-known, referer binance.com

From reading online its my understanding that it could be caused by a .htaccess file denying access permissions somewhere, and that I might need to contact our webhosting service. But I don't understand why suddenly I am being denied access.

At first I thought it was the settings I was changing in the admin panel, (which were under Stores->Configuration->Catalog) but I don't see how those could be related and I cannot go back and revert my changes because when I navigate the Stores I am immediately transported to the login screen.

I've already tried,

Removing cache and generated files

Disabling and reenabling cache

Running setup:upgrade and setup:di:compile

Redeploying content

I've also tried to look for the file mentioned in the error ../html/pub/.well-known but I can not find it (even with 'll -a')

Any ideas why I could have suddenly been denied access? Or any thoughts on what I should do next?

  • Better to check logs, pub/.htaccess and try to remove htaccess from pub/ keep in mind always do backup what you are going to delete Aug 4, 2023 at 20:23

1 Answer 1


This error does not related to the "admin area get stuck loading" issue, you can ignore this error log. Read more about this error here https://stackoverflow.com/questions/68831725/getting-lots-of-server-errors-directory-index-forbidden-by-options-directive-fro

I don't believe that the config values in Stores->Configuration->Catalog is caused this issue.

This issue is quite weird, you can try reinstall all composer packages and run setup upgrade command, recompile code to see if that resolves the issue. To do this, run the following commands:

rm -rf vendor && composer install
bin/magento setup:upgrade
bin/magento setup:di:compile
  • Thanks for the suggestion. I ran this and kept running into errors about files not existing. But I got around it and am still having the same issue. I even tried restoring the entire vendor directory from a backup I found and I'm still stuck.
    – Isaac
    Aug 2, 2023 at 13:15
  • Thanks for the offer, unfortunately I am unable to do that due to our company policies, and you would be unable to reach our dev server since you are not within our LAN
    – Isaac
    Aug 3, 2023 at 11:30
  • @Isaac what I can share with you now is: the behavior of your issue (redirect to login page when visit any admin page) seems related to the session. Hope you can resolve the issue. If so, that would be great if you can add an answer in this post to share the root cause of the issue.
    – Tu Van
    Aug 4, 2023 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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