我使用Homestead建立了Laravel当地环境。 当我访问“http://homestead.app/”时,浏览器显示“找不到404文件”。
[Local - homestead.yaml]
ip: "192.168.15.10"
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Laravel/public
hhvm: true
- map: firstapp.local
to: /home/vagrant/firstapp/public
hhvm: true
[宅]
vagrant@homestead:~$ ls
Code firstapp Laravel
我创建的目录是通过以下composer命令构建的。
composer create-project laravel/laravel firstapp --prefer-dist
composer create-project laravel/laravel Laravel dev-develop
有什么问题?如果可能的话,你能告诉我如何创建Laravel项目。
答案 0 :(得分:0)
folders:
- map: ~/Code
to: /home/vagrant/Code
您将代码映射到home/vagrant/Code
但是您的sites:
引用了不同的文件夹
sites:
- map: homestead.app
to: /home/vagrant/Laravel/public
hhvm: true
- map: firstapp.local
to: /home/vagrant/firstapp/public
hhvm: true
将/home/vagrant/Laravel/public
和/home/vagrant/firstapp/public
更改为
/home/vagrant/Code/Laravel/public
和/home/vagrant/Code/firstapp/public