Are you already tired from writing Apache2 or nginx configuration manually? I found a solution for that by writing a script where you just answer on some questions about your virtual host and script will do everything for you.
Before you start your new experience with virtual host configuration, you need to install apache2, if you want to use nginx, you need to install it too.
# to install the script from the repository
# type the command below, if you are already familiar with git and how it works, then you can ignore this message.:P
git clone https://github.com/narukoshin/virtualhost-configurator
# Enter the directory that you just now cloned
cd virtualhost-configurator
# grant execute access to the script
chmod +x virtualhost-configurator.sh
# now, run it as root because it will work with services configuration files so it requires a root access
sudo ./virtualhost-configurator.sh
# script will ask you a few questions about your virtual host and create configuration...
# ...and folders depending on your answers so make sure, that you type everything correctly.
Before we begin setting up the apache2 virtual host, we need you to specify the name of conf
Please type the name of conf: (eg. narukoshin.me): mywebsite.com
# and so on...
# If you choose to create Virtual Host with SSL, you need to add them first before you restart your service(-s).
# I hope you know how to do that.
# Later, when you finished your configuration, you successfuly set your SSL certificates in place, you can now reload services.
# To restart the services use commands below
# For apache2
sudo systemctl restart apache2
# or
sudo service apache2 restart
# for nginx
sudo systemctl restart nginx
# or
sudo service nginx restart