By default, Vagrant Boxes use NAT mode, which means that guests are behind the router engine ( VirtualBox Networking between the host and the guest ), which transparently displays traffic from the virtual machine. Guests are invisible and inaccessible to the host.
To do this, we need port forwarding. Otherwise, services running on the guest page are available.
In your case, you use a Private network , the guest will be assigned a private IP address, to which the host ONLY can access, which is 192.168.33.10 .
The correct way to access a website hosted on a guest computer is β http://192.168.33.10 from the host.
You have port forwarding feature in Vagrantfile
www.vm.network :forwarded_port, guest: 80, host: 8888 # Apache port
It forwards guest port 80 to your 8888 host. Since you are NOT using NAT mode , I am sure it will be ignored. Try curl -Is http://localhost:8888 .
NOTE. Even if it still works, you must access the network through => http://localhost:8888/ from your host.
source share