我安装了宅基地和laravel 5.3 现在我想设置我的主页并在本地访问它。因此我创建了这个YAML文件:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Documents/Development/Source/MFServer
to: /home/vagrant/Development/Source/MFServer
sites:
- map: loc.medifaktor
to: /home/vagrant/Development/Source/MFServer/public
databases:
- homestead
和hosts文件:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.10.10 loc.medifaktor
但是当我访问loc.medifaktor时,我收到错误:
此站点无法访问loc.medifaktor的服务器DNS地址即可 找不到。
答案 0 :(得分:1)
- map: ~/Documents/Development/Source
to: /home/vagrant/Development/Source
属性是所有项目的根文件夹。将其更改为:
Source
确保您的MFServer项目安装在vagrant reload --provision
文件夹中,所以基本上就像您现在所说的站点映射一样。
然后重新加载&如果您已定义别名,请使用homestead reload --provision
或/Development/Source/[project]
提供家园。
如果您现在进入宅基地,您的项目源代码应该在Terminating app due to uncaught exception 'NSInternalInconsistencyException', **reason: 'A variable must be decoded with a \`delegate\`'**
*** Assertion failure in -[NSISRestrictedToNonNegativeMarkerVariableToBeMinimized initWithCoder:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation_Sim/Foundation-1349/Layout.subproj/IncrementalSimplex/NSISVariable.m:175