My local stack includes MAMP, VirtualBox and ModernIE. ModernIE is great for cross-browser testing, but you have configure your "hosts" file. Here are the steps to get localhost working through VirtualBox:
- Click on
settings -> network
bridged adapterfrom the dropdown
- Boot up your virtual machine
- Navigate to
- Change permissions. Right click,
Properties -> Security -> Advanced.Select
Change Permissions. Click
Full Control -> Ok.
- Enter the IP address of your localhost and the URL
- Save changes
- Open a web browser and type in your address. Your localhost should now resolve.
For testing on Ubuntu (via VirtualBox), you will need to bridge the network adapter and edit your host file as well. It's much easier than on Windows!
- After bridging the network adapter (like above) open Terminal, and type:
sudo nano /etc/hosts
2) Enter the IP address of your localhost and the URL
- Save the changes ( CTRL + X + Y ) and exit
**Note: If your localhost is setup for DHCP, you'll probably need to update the hosts file with your new IP on a regular basis.