我一直在努力让Laravel / Homestead在ubuntu 15.1上运行,我正努力让我的Homestead.yaml文件中的文件夹和网站映射。虚拟机启动并运行,当我在浏览器中访问Homestead.app时,它告诉我没有指定输入文件。我知道我没有正确映射它。
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Homestead/Projects/Laravel
to: /home/vagrant/Projects
sites:
- map: homestead.app
to: /home/goldenos/Homestead/Projects/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
我将〜/ Homestead / Projects中的index.php文件放在名为Laravel的文件夹中,如果我需要提供任何其他信息,请告诉我,我会尽快提供。提前感谢您的任何信息! -Luke
答案 0 :(得分:3)
试试这个:
folders:
- map: ~/Homestead/Projects // your local whole projects folder on the host machine (so you can setup multiple websites on the same virtual box)
to: /home/vagrant/Projects // synced folder in virtual box
sites:
- map: homestead.app
to: /home/vagrant/Projects/Laravel/public // path of project in the virtual box
- map: site2.app
to: /home/vagrant/Projects/Site2/public
在编辑.yaml文件之后,不要忘记运行vagrant up / reload flagging --provision:
vagrant up --provision
OR
vagrant reload --provision