curl -L https://git.io/JYnOL | sh
vh -u
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install --yes wget ansible
git clone https://github.com/naresh335/ansible-virutalhost-multiPHP.git ~/vh
sudo wget https://git.io/JYnsz -O /usr/local/bin/vh
cd ~/vh && ansible-playbook setup.yaml -K --extra-vars "php_version=7.3 user=dev directory=projects url=app.test"
Note: make sure to update
php_version,user,directory,url
accordingly
directory variable should expand in this case from projects -> /home/dev/projects
Examples for directory variable.
project | Full path used in installation |
---|---|
Apps | /home/dev/Apps |
Workspace | /home/dev/Workspace |
Documents/public_html | /home/dev/Documents/public_html |