1. When running the script and entering the project name, the system reports a project name validation failure. See Figure 1.

Plaintext
root@iZ2ze4fjghbbj74d4kfnf0Z:~/laravel-ubuntu-init# ./20.04/nginx_add_site.sh
请输入项目名:lashop
项目名包含非法字符
2. Edit the corresponding script file and comment out the validation code that triggers the error. See Figure 2.

ShellScript
#[[ $project =~ ^[a-zA-Z\0-9_\-\.]+$ ]] || {
# ansi -n --bold --bg-red "项目名包含非法字符"
# exit 1
#}
3. After running the script again, the error no longer appears. See Figure 3.

Plaintext
root@iZ2ze4fjghbbj74d4kfnf0Z:~/laravel-ubuntu-init# ./20.04/nginx_add_site.sh
请输入项目名:laravel-shop
请输入站点域名(多个域名用空格隔开):-
域名列表:-
项目名:laravel-shop
项目目录:/var/www/laravel-shop
是否确认? [y/N] y
配置文件创建成功
Nginx 重启成功
