How do I view a website in my desktop browser from a web app running in server in a VM on my desktop?

161 Views Asked by At

I am running Ubuntu on my workstation, and headless Ubuntu Server in VirtualBox on this same workstation.

I'd like to write a web app and deploy it on Ubuntu Server in the VM, then load it in a web browser on my workstation.

Is this possible, and if so how? Thanks!

2

There are 2 best solutions below

0
bgibson On BEST ANSWER

Found the answer: Change the Virtual Box -> Settings (for the guest OS) -> Network -> Attached to: Bridged Adapter.

0
Nils Weinander On

If you want to keep NAT, you can use port forwarding, see this, exchange the ports to 80 and 8888 (or something) to do the same for HTTP.