Move inside the directory development/wsl
:
cd ~/development/wsl/
Using your preferred text editor, open config.yml
and, under the virtualhosts
key, enter the virtualhosts that you
want to create, each on its own line.
Already existing virtualhosts will be skipped, their contents will not be lost, no need to comment or remove them.
Save and close the file.
Create the specified virtualhosts:
ansible-playbook -i hosts create-virtualhost.yml --ask-become-pass
This process will ask for your password (set during the installation process) and then iterate over the list of
configured virtualhosts
and will output a short summary with the results.
Your virtualhost should be accessible and ready to use.
You will install your project under the html
directory of your project, for example:
/var/www/example.localhost/html
.
The virtualhost's document root is set to the
public
directory of the above location, for example/var/www/example.localhost/html/public
.If you want to have the DocumentRoot directly in
html
folder, you need to modify the file/etc/httpd/sites-available/example.localhost
.
/var/www/
./var/www/html/
.