Download the add-vhost.sh
file, make it executable and move it to /usr/bin/add-vhost
:
sudo chmod +x add-vhost.sh && sudo mv add-vhost.sh /usr/bin/add-vhost
Run it as root from anywhere:
sudo add-vhost
This will create a configuration file for the Apache, both for non-SSL and SSL versions, and also allow you to set different PHP versions if you have installed them as PHP-fpm services.