Develop for Windows Explorer Browsers from Ubuntu (with VirtualBox)

Lately I wanted to setup my ubuntu box with virtualbox so I can also run windows and mainly to be able to test on windows the look of some of the sites I develop. In order to do that I could choose to put up a site online to a live server somewhere. Although this is feasible for me since I have a special setting with my hosting, dropbox fix, and unlimited space and subdomains, I think it would be too much to be updating files on a far server just for a rapid change. Therefore I decided to have the virtual windows to be able to load pages from my host ubuntu apache2 server which was all along configured.

I found THIS post but it did the inverse. The guys from windows trying to develop sites on ubuntu. That is not what we want! Rather we want to just check our sites we develop on native ubuntu into the nightmare of Internet Explorer’s versions. Yes if you are reading this encourage your users not to use any of those browsers. And that is not changing in the latest beta or whatever version. It will just not change.

Going to the meat you want to have handy these details:

[code]
# ifconfig (to look for your IP in your ubuntu host)
[/code]

[code]
cat /etc/resolv.conf (your ubuntu host DNS)
[/code]

On the windows guest set a fixed IP (e.g. as in the image) and a DNS (same as ubuntu host)

Under Devices on your windows guest virtuabox window on Network Adapters have it this way:

Finally, on your windows guest you should set the domains your developer sites are being served by your ubuntu host apache2 setup.

For instance if I am serving a site as http://ward.local on ubuntu then I have to go into my windows guest and go under C:/Windows/System32/Drivers/etc/hosts and add the entry like this:

Using the IP I got from my ubuntu host with:
[code]
# ifconfig (to look for your IP in your ubuntu host)
[/code]

I enter:
[code]
127.0.0.1 localhost (this line is already there)
XXX.XX.XX.XX ward.local (this is the new line)
[/code]

Of course don’t enter the lines with parenthesis.

Now you should be able to enjoy seeing your sites on windows iexplorer browsers.

Helping you? Please encourage me with a donation: http://bit.ly/donateforhelp
I am a freelancer and don’t work for any company. By donating you will be helping me to help others as yourself.
Need help with your site? Conact me at http://bit.ly/contactasap

Leave a Reply

Your email address will not be published. Required fields are marked *