我有这个奇怪的问题。让我来形容一下:
我在优胜美地(今天更新)上使用了Homestead 2.0,Laravel 4(一切都是最新的)。代码在这里:
YAML file
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/aligajani/Dropbox/Work/Code
to: /home/vagrant/Code
sites:
- map: forum.app
to: /home/vagrant/Code/CommunityFT/forum/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
HOSTS file
#Added by XAMPP Control
127.0.0.1 Alis-MacBook-Pro.local
192.168.10.10 forum.app
答案 0 :(得分:0)
为了使forum.app
成为与Homestead一起使用的有效域,您需要将其指向主机文件中的本地计算机。
您可以通过打开终端并输入vim /etc/hosts
来执行此操作,然后添加以下行:
127.0.0.1 forum.app
您的浏览器也可能无法查找forum.app域名,因此请务必在首次访问时尝试添加正斜杠,因此forum.app/
,这会阻止浏览器尝试谷歌搜索。< / p>
未向浏览器显示的错误可能与此拉取请求有关:
https://github.com/laravel/homestead/pull/140
这是Nginx配置问题。
希望这有帮助!