These are the steps needed to create an Apache HTTP web server running in a virtual machine.
First of all, grab some html code and edit it in Notepad to use as a test website.
Save it to your desktop as index.html
If you were to double click on this icon, your default web browser would fire up and the web page would be displayed:
This the best way to create and test your website before using it in your Apache HTTP server.
Now we want to save that as a file in an Apache server running in a virtual machine.
Download the Oracle open source virtualization software Virtualbox. Once that is up and running, go grab the open source Ubuntu Linux server LTS and save the .iso image on your desktop or burn it to a disc.
Start a new virtual machine in Virtualbox (“New”) and install (“Show”) the Linux server. When running through the configuration, install the LAMP packages. LAMP stands for Linux, Apache, MySQL and PHP.
Once installed, start up Ubuntu Linux server.
For the index.html file to be served from the correct target directory, we need to first get to the proper file location and then create a directory where the files will be saved. Once that is done, then at the $ prompt, we will start the nano editor in the file to be created and saved. The default directory where websites are served in Ubuntu Linux Server LTS 14.04 is /var/www. The default webpage is at /var/www/html/index.html.
We want a new directory to hold each of 3 separate websites: