I set up a basic local site with trellis and vagrant for the first time this morning. After running vagrant up I’m able to access the local site on my browser when i type in my live url, but after stopping the virtual machine I’m no longer able to access the live site on the web. I just get a hanging site on all browsers.
I haven’t yet pushed anything from my local setup to the web, but my local url is sixthboroughdesign.com, and so is the live site.
You’ll probably be able to access sixthboroughdesign.com and see a placeholder site, which I used to see too and it’s hosted on godaddy. But after setting up trellis this morning I can no longer access sixthboroughdesign.com on my laptop.
With vagrant up running, i can access sixthboroughdesign.com in chrome and see the local site. I’m sure I’ve done something wrong, but now that I’m in this state I can’t find any way to stop getting the local site and load the live site again.
If you’re using the same url for local and production, your hosts file has probably been modified to point to your local site, which is why you can’t access the remote one. You should use different urls for development and production. Here are some instructions for manually changing your hosts file, if you need to: https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
If you’ve got site.co.uk in the - canonical: bit then Trellis will have added that domain in your .hosts file for the IP address in trellis/vagrant.default.yml (probably 192.168.50.5).
You’ll need to delete that entry from your hosts file and change the - canonical: url, then run vagrant provision.
Thank you @ng3 and @alwaysblank! I will confirm this shortly, share the results, and close this issue if it’s resolved. I predict you’ve solved it, I think I set up my canonical url with .com instead of .test.