Setting up a Virtual Web Server with VirtualBox, Apache, MySQL, FTP, Ubuntu, and Samba

Published on April 17, 2016 by Daniel Lanza

 ubuntu  virtualbox

This tutorial will explain how to set up a Ubuntu Server virtual machine with:

First, check out how to install Ubuntu Server on VirtualBox to get ready a virtual machine to test.

Our virtual machine has two network adapters. The second one (eth1) is a host-only adapter with a static IP address -> 192.168.56.101

Apache Web Server

Apache Web Server needs to be running. The installation and configuration was indicated in the previous post. Type the IP address on your browser to see Apache2 default page.

Apache2 Ubuntu Default Page
Apache2 Ubuntu Default Page

FTP

Install proftd on Ubuntu server:

sudo apt-get install proftpd

Select the ProFTPD configuration. You can choose between:

I selected standalone.

ProFTPD configuration
ProFTPD configuration

Install on your local machine a FTP client. I recommend FileZilla.

Now, we are going to verify our static IP Address for host-only network adapter (eth1).

ifconfig
Server for FTP connection
Server for FTP connection

Type server, user and password in your FTP client to connect.

FileZilla connection
FileZilla connection

Samba

Edit Samba configuration file.

sudo vi smb.conf

Add at the end the following:

Samba file configuration
Samba file configuration

Type :wq to save and close. Then, restart Samba server.

sudo restart smbd

Type your user login for network share.

User login for network share
User login for network share

You will be able to share files from your PC to the virtual machine by network.

Network share
Network share
comments powered by Disqus

See also

Install Ubuntu Server 14.04.4 on VirtualBox

This tutorial will explain how to install Ubuntu Server on a virtual machine. First, you need to have Ubuntu Server ISO file and VirtualBox installed. VirtualBox Ubuntu Server Create a new virtual machine on VirtualBox by clicking on New. Create new virtual machine Select type and version of the virtual machine. In this case, Linux and Ubuntu (64-bits). Select type and version of the virtual machine Select the amount of memory (RAM).

Read more