cd /etc/apache2/sites-available
cp 000-default.conf yourdomain.com.conf
nano yourdomain.com.conf
<VirtualHost *:80>
ServerAdmin youremail@gmail.com
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/www.example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined
</VirtualHost>
cd ../sites-enabled
ln -s ../sites-available/example.com.conf example.com.conf
a2ensite yourdomain.com
service apache2 restart