apt-get update apt-get install apache2
a2dissite 000-default service apache2 reload
mkdir -p /var/www/example-site/
Place the actual html files etc. into the website directory.
Alternatively, populate the directory from another source, such as:
git clone https://github.com/example/example-site.git cp -r example/* /var/www/example-site
chown -R www-data:www-data /var/www/example-site
Base the config file on the default config file.
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example-site.conf
vi /etc/apache2/sites-available/example-site.conf
between
<VirtualHost *:80> ServerName example-site DocumentRoot /var/www/example-site </VirtualHost>
a2ensite example-site.conf service apache2 reload
Within a web-browser enter
http://example-site