I'm trying to set up my project into virtual machine so I can work with it from my host machine. I've set up port forwarding in vagrantfile and when I run 'vagrant up' everything is ok and there is no errors. But when I try to access to my app in VM from host machine, I can't. My vagrant file is realy simple:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise32"
config.vm.network :forwarded_port, host: 4567, guest: 8001
config.vm.synced_folder "data", "/home/vagrant/projects/myapp/"
end
On start I get this:
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8001 => 4567 (adapter 1)
default: 22 => 2222 (adapter 1)
Looks like there is everything OK, but when I try to access to 127.0.0.1:4567 from my host (and I run my app in guest machine on 127.0.0.1:8001), I get ERR_EMPTY_RESPONSE
err_code in browser.
What I'm doing wrong?
vagrant ssh
and then get site from local port 8001?