diff --git a/bin/vhost.sh b/bin/vhost.sh index 4a9788b..ac1a168 100755 --- a/bin/vhost.sh +++ b/bin/vhost.sh @@ -30,7 +30,7 @@ function vhost::set-phpVersion () { # crude but good enough domain name format validation function vhost::validate_domain () { local my_domain=$1 - if [[ $my_domain =~ ^(([a-zA-Z](-?[a-zA-Z0-9])*)\.)+[a-zA-Z]{2,}$ ]] ; then + if [[ $my_domain =~ ^(([a-zA-Z0-9](-?[a-zA-Z0-9])*)\.)+[a-zA-Z]{2,}$ ]] ; then return 0 else return 1