How can I host a website in a virtual machine?

9,213

The procedure is basically as follows: you need to create a "virtual" network adapter on your host machine, with its own IP address (yes, it is possible for a physical network card to have multiple IP addresses) and then set up VirtualBox guest so it binds to that adapter. This way the guest gets its own IP address which is visible in your local network just as if it was a physical machine.

This is called "bridged networking", and after you set up your host system, setting up the guest is just a matter of going to the guest's Settings - Network and selecting "bridged adapter" from the Attached to: dropdown.

Now, I never did this with a Windows host, but here appear to be some instructions here. Also, now when you know the "magic word" - google is full of information.

Share:
9,213
Jacob
Author by

Jacob

Updated on September 18, 2022

Comments

  • Jacob
    Jacob over 1 year

    Before you shoot this down, please let me explain what I mean....

    I am running Windows, I also have a virtual machine installed that is running Ubuntu. I want to set up a website on Ubuntu (the virtual machine) that is either only accessible to my Windows physical machine or only accessible to other computers on my private network/LAN. So, how would I set this up? How do I host a "private" website on Ubuntu?

    This video sort of demonstrates what I'm after, when he does the slowloris demonstration, he's running the webserver on windows and then attacking through Linux virtual machine. How do I do that, except reversed? http://vimeo.com/7618090