HTML and Vagrant

44 views Asked by At

So I have this HTML file I wrote in Vagrant. Is there a way I can run the HTML file from Vagrant so that it displays on a browser on my host Operating System? I'm using ubuntu/focal64 for my virtual environment in Vagrant.

I wonder if I can forward in a similar way as with x_11 forwarding.

1

There are 1 answers

0
HLB On BEST ANSWER

What you need is something that will run a webserver to service your HTML in your Vagrant. Then you would forward the ports from Vagrant webserver to your local machine.

You can read more here: https://developer.hashicorp.com/vagrant/docs/networking/forwarded_ports