我安装了Virtual Box和Vagrant。我也设置了我的Homestead,但是当我尝试运行我的域时,它不会加载并显示错误-该站点拒绝连接。这是我的homestead.yaml文件:
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Users/Asus/Desktop/Projects/MVC
to: /home/vagrant/MVC
sites:
- map: infoStudio.test
to: /home/vagrant/MVC/public
databases:
- homestead
答案 0 :(得分:0)
yaml文件需要特定的新行和缩进。
看看this example。
有关更多信息,请查看wiki。
文件的正确语法为:
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Users/Asus/Desktop/Projects/MVC
to: /home/vagrant/MVC
sites:
- map: infoStudio.test
- to: /home/vagrant/MVC/public
databases:
- homestead