Drupal10 blocks connection by default
After installing Turnkey Drupal 10 into VirtualBox and configuring it, the connection to either http:// or https:// results in this:
The provided host name is not valid for this server.
Which would apparently happen if trusted_host_patterns was enabled in the settings.php.
But it is not.
I'm not even working with domains yet, it's all on the local network where computers have IPv4 addresses. I'm not doing my web development across the internet.
And even after enabling trusted hosts and entering the IP of the computer where I am connecting from, it is still showing this message.
So I have no idea what is causing this.
Thanks for the report @testman42 - I'm currently dealing with an external (non TKL related) crisis but I hope to be back at my desk Monday (at least for a bit) and will look into this ASAP.
no need to rush take the time to solve the crisis first this issue can wait
Apologies for taking soooo long to get back to this. TBH I only just noticed it (again) now.
I've had a bit of a dig into this one and the default Drupal config we supply DOES configure trusted_host_patterns. At build time we set it to www.example.com. At firstboot, it is updated to the value you enter when completing the Drupal firstboot script.
There are a number of ways to run a local dev server. It sounds like you've tried a couple but without sharing the specific details of what you did, it's hard to know exactly what the issue might be. I double checked on a local TKL Drupal10 VM and it work as expected for me? I tried both disabling it and setting an IP.
Considering what you've shared, my guess is either you are not commenting it out/updating it in the right config file - /var/www/drupal10/web/sites/default/settings.php or there was some sort of typo somewhere in what you did. Or you didn't restart Apache after updating the config - systemctl restart apache2.
So I'm going to close this for now, but if you continue to have issues, please feel free to reopen it. If you do though, please give me the exact steps required for me to reproduce the problem you are hitting.