I've been able to setup a number of local servers using different boxes; laravel/homestead
& ubuntu/xenial64
. These seem to spin up fine and when I run vagrant shh
I can connect to the server without any issue. It even seems to be syncing the folder as expected into the /vagrant
directory.
But when I try to load this (http://127.0.0.1/) into the browser, I just receive a "This site can’t be reached" error in Chrome.
By default the Vagrantfile
looks like this:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
end
I've previously been using Mamp Pro (which is still installed but not active) on my macOS High Sierra machine. So I don't think there is any port conflicts or anything like that.
But in case this is the issue, I have tried setting up a specific IP address like so
config.vm.network "private_network", ip: "55.55.55.5"
I've also tried defining different ports for the host
config.vm.network "forwarded_port", guest: 80, host: 4567, host_ip: "127.0.0.1"
I must be missing something in the configuration, but according to the documentation this should work. Any suggestions?
Just FYI, I've installed VirtualBox and Vagrant (using Homebrew) and am using Vagrant Manager to oversee the boxes.