Firstly, you will need to download the following:
- A Linux distribution CD image that includes web server software such as Apache (I chose Debian)
- Virtualbox 2.1
Install VirtualBox, then create a new system and virtual hard disk file. I made my virtual disk dynamically expanding up to 10.0 GB and set available memory to 256 MB.
Before booting up the new guest OS, select it from the list, then click Settings. Select Network from the list, then change the Attached to: setting to Host Interface. Select the host interface connected to the internet from the list, then click OK.
Once the machine boots for the first time, it will ask for installation media. Choose to add and mount the Linux image you downloaded, and proceed through the installation process. When installing Debian, I told it to install all web server and database packages. Your portable web server can very easily be scaled to a LAMP server by installing extra packages.
Reboot to the guest OS once it is finished installing. The Apache service should start automatically (assuming you are using Apache). Place whatever HTML files or whatever else in the /var/www/apache2-default directory. If you are behind a router, make sure to set port 80 to forward to your guest IP (found by using ifconfig or /sbin/ifconfig).
Now open up a web browser, type in your real IP address, and you should see "It Works!" or some other default page (unless you already changed it).





0 comments:
Post a Comment