Homestead\scripts\site-types\laravel.sh
大概40行
block="server {
listen ${3:-80};
......
}
"
修改為
s_array=(${1//:/ }) #用:分割域名
s_port=${s_array[1]-80} #s_array[1]為空就用80 否則用s_array[1]
block="server {
listen ${s_port};
Homestead\Homestead.yaml
sites:
- map: 127.0.0.1:9700
to: 專案路徑/public
ports:
- send: 9700
to: 9700
瀏覽器開啟127.0.0.1:9700
本作品採用《CC 協議》,轉載必須註明作者和本文連結