首頁(yè)修改Apache 的配置文件 如果是 MAMP 路徑是 ”/Applications/MAMP/conf/apache/httpd.conf“
用編輯器打開(kāi) 搜索 "vhosts" 關(guān)鍵字 定位到下面這行內(nèi)容
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 去掉注釋,
保存后,用文本編輯器打開(kāi) /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf,加入需要配置的虛擬地址,

保存后,來(lái)到host配置文件,/etc/hosts,可以進(jìn)入finder,shift+command+G,輸入/etc,回車后找到hosts文件,用編輯器打開(kāi) ,添加對(duì)于內(nèi)容保存 重啟服務(wù)器

2
上面提到的的根目錄 指的是你TP5項(xiàng)目入口文件(public/index.pnp)所在目錄?