我想使用 vagrant 来测试我的网站。我的操作系统是 Mac,我使用的是 Ubuntu 盒子。每次 vagrant 启动时,它都会nodeproject-default-1467385921475-38104.shared在主机文件中设置一个条目。设置它的正确方法是什么,以便当我输入mygreatapi.com或www.mygreatapi.com时它会命中 vagrant 框?我试着用
config.vm.hostname = "mygreatapi.com"
但它只为盒子设置主机名。当我在框中 ping mygreatapi.com 时,它 ping 到 127.0.0.1 但我无法从我的 Mac 访问 mygreatapi.com