This program tries to automatically generate virtual host data for you and creates the ssl certificate with certbot
It can be used for generating subdomains too.
to use this file, run
# go to the directory where it is saved
cd /home/path/to/directory
#run program
sudo bash ./new-vhost.sh [sitename.domain]
# e.g
# sudo bash ./new-vhost.sh test.org
then visit 'sitename.domain' in your browser
NB: sudo is required to restart apache server and create a new virtual host file
sudo nano /etc/hosts
127.0.0.1 localhost test.domain