Bash Script to allow create apache/nginx virtual hosts on Ubuntu on a quick way.
This script is a modified version from https://github.com/RoverWire/virtualhost.
- Download/ Copy the script
- Apply permission to execute:
$ chmod +x /path/to/virtualhost.sh
- Optional: if you want to use the script globally, then you need to copy the file to your /usr/local/bin directory, is better if you copy it without the .sh extension:
$ sudo cp /path/to/virtualhost.sh /usr/local/bin/virtualhost
$ sudo virtualhost example.com