Update Domain Name of M2 instance from
So, I changed the Domain Name of my Magento 2 store using the following commands:
bin/magento setup:store-config:set --base-url="http://beta.example.com/"
bin/magento setup:store-config:set --base-url-secure="https://beta.example.com/"
This worked fine, until the next day. When I tried to load my admin url (
http://beta.example.com/admin), I was forwarded to the below URL with this error:
- "This page isn’t working beta.example.com redirected you too many times."
Regardless of trying to load
http://beta.example.com/admin after clearing cookies on different Browsers and Devices, I couldn't get past this point.
In order to resolve this, I have to clear the cache by running the below commands.
This seems to work for a bit until I go to load the backend the next day. I can't even reproduce the error until the next day...
Any ideas what could be causing this? Or even why my temp workaround only works for a few hours?
Notes: Day 1
The only thing I can think of that happens overnight is Indexing (maybe). So, I've ran the below command. Will report back in 24 hours
Notes: Day 2
Indexing had no affect. Admin URL still reset to "broke" the next day. I'll try clearing all cache folders today using the below command. Will report back in 24 hours
rm -rf var/page_cache var/cache var/generation var/div var/view_preprocessed generated/metadata/* generated/code/*
Notes: Day 3
No affect. Tried updating Admin URL to see if that does anything with:
bin/magento setup:config:set --backend-frontname="admin_path"
Notes: Day 4
Notes: Day 5
I've narrowed down that it's
config that requires either Cleaning of Flushing with either command.:
bin/magento cache:clean config or
bin/magento cache:flush config
I've yet to determine what changes over ~24hrs for me to have to keep doing this though.