Why won’t web work?

Why won’t web work

(or the trip hazards of testing from outside a VM)

A problem resolved…

As someone new to web development I ran into an issue the other day that baffled me for an inordinate length of time. As I am essentially required to run Windows as the O/S of choice in my organisation, but my natural habitat is Linux I tend to spend a lot of my time developing my applications and scripts within a virtual machine.

I am a big fan of the Python ecosystem, and naturally, as I test the waters with web development I’d like to investigate pythons tools and frameworks. I also made a change the other day to my process where instead of running a browser internal to my VM, for testing and viewing I decided to run the browser from my host machine.

Running the simple HTTP server in python using python -m http.server was one of the first services I tried. A quick jump onto Chrome later I was initially perplexed that it wasn’t showing up.

However, with not much searching I quickly realised that the default Network setting on VirtualBox (NAT) does not allow connections out unless I explicitly open a port. With that stored in my memory bank, I went on my way, now thinking that I knew how to solve similar issues in the future.

Continue reading