首页修改Apache 的配置文件 如果是 MAMP 路径是 ”/Applications/MAMP/conf/apache/httpd.conf“
用编辑器打开 搜索 "vhosts" 关键字 定位到下面这行内容
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 去掉注释,
保存后,用文本编辑器打开 /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf,加入需要配置的虚拟地址,
保存后,来到host配置文件,/etc/hosts,可以进入finder,shift+command+G,输入/etc,回车后找到hosts文件,用编辑器打开 ,添加对于内容保存 重启服务器
2
上面提到的的根目录 指的是你TP5项目入口文件(public/index.pnp)所在目录