DNS Issue with primary domain & sub-domains
Everything was going perfect for several months. I like so many, quickly fell in love with Laragon and it became a critical development tool. Whenever I created a new site, I used the following pattern:
Today I have dozens of sites like this. Then earlier tonight I created a local site for the primary domain as I decided it was time to give it a new look.
I worked on it for a few hours and then went back to work on a different site and it turns out, ALL of the sub-domains are being forwarded to the primary domain. I checked several of them and ever since creating the site using the primary domain name I ran into trouble. Many of the sub-domain sites are worked on daily and they were fine earlier today.
So to try to work backwards and I edited HOSTS file and commented out the #primarydomain, I renamed the virtual host file in sites-enabled to auto.primarydomain.localdev.conf.old, restarted Apache, restarted everything, cleared Google cache... and still, all sub domains are being forwarded to primarydomain.localdev.
Before it was a 404 page missing error when I landed at the primary domain, now it's different errors due to changes above.
What did I miss?
@billiemead : How about deleting all former
Menu > Apache > sites-enabled > Delete all auto...?
Thank you so much for the quick reply.
I did that, confirmed the directory was empty. Restarted Chrome, restarted all services and went to https://sitename.primarydomain.localdev and was immediately forwarded to the primary domain!
I did noticed all the the auto virtual host files are back, must be auto-created anew?
I also noticed that the entry in the HOSTS file is back!!
127.0.0.1 primarydomain.localdev #laragon magic!
How do I completely delete this site from Laragon, all traces? Maybe that will get me at least back to where I was!!
Just checked Chrome, Firefox and Opera.. all doing the same. I never went to some of the domains using Opera but they forwarded just the same so it's definitely not a caching issue. Just wanted to rule that out...
Next, I made a copy of HOSTS file, deleted everything and only left one entry:
127.0.0.1 sitename.primarydomain.localdev #laragon magic!
Unbelievably, it forwarded to primarydomain.localdev (which now just gives a browsing error)