When testing your website on Windows can be a bitch sometimes running services like Valet to do your serving for you. In other projects, we use webpack to take care of this but in a current Magento Project we use Valet Plus to run this. The only problem is, we couldnt get the project to run on mobile phones or the windows Virtual box.
The problem with the phone we didn't fix yet, but for Virtual box we have a solution!
- Start your windows in VirtualBox.
ifconfigin terminal on your local machine.
- Get the IP-address from the vboxnet0, this is 192.168.33.1 in my case.
- Go to your Virtual box running windows.
- Navigate in your explorer to:
- Copy the
hostsfile to and paste it on your desktop.
- Open de hosts file with something, like notepad.
- Add the your local domain to the bottom with your local IP address (from step 3) example:
- Save the hosts file.
- Drag (yes drag!! not copy/paste) the file back in to the folder where it came from.
- You will get the question if you want to replace the file, yes you do! (if you copy/paste you don't get this question).
- You don't have to do anything new, it should just work. :)