You can either edit that default file or create a new one for your domain. Assuming you want to create a new virtual host configuration for the domain
example.com, you would need to do the following steps. swap out example.com for the name of you domain.
cd /etc/apache2/sites-available/
sudo cp 000-default.conf example.com.conf
sudo mkdir /var/www/example.com
sudo mkdir /var/www/example.com/public_html
sudo echo '<h1>This is the index file of example.com' > /var/www/example.com/public_html/index.html
sudo chown -R 775 /var/www/example.com/
Now you have a config file called /etc/apache2/sites-available/example.com.conf, a web root at /var/www/example.com/public_html and an index.html file in the web root.
Next you need to modify the config file for your domain name (remember swap example.com for your domain name:
sudo nano /etc/apache2/sites-available/example.com.conf
The file should end up looking like this:
<VirtualHost *:80>
ServerAdmin
[email protected]
ServerName example.com
ServerAlias
www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Once you have made the changes to the config file, you need to enable the virtual host. This involves creating a symlink to your config file in /etc/apache2/sites-enabled/. Apache2 has a helper to do this:
sudo a2ensite example.com.conf
You can also disable the 000-default config if you want:
sudo a2dissite 000-default.conf
Now the preparation is finished, you need to restart apache for the changes to take effect:
sudo service apache2 restart
For more information visit:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04