Setting from Beginning
Apache Installation
$
sudo aptitude install apache2
$sudo apt-get install apache2-utils apache2-common
NameVirtualHost
With the default configuration you are only serving up one site, and that site is based on your IP address. What I’m setting up is name-based virtual hosting, meaning the Apache server will serve specific content based on the domain name requested. In this way a single server can host multiple sites, and serve up unique content based on the domain requested.
My preferred method of using name based virtual hosting is creating a separate file for each domain. These can all be done within one file, but I’ll be creating a new file for each site.