Puphpet / Vagrant:无法访问IP地址的LAMP VM

我使用Puphpet.com来部署本地的Ubuntu 16.04 LAMP开发机器与VirtualBox 5.1.24。 我用VM IP地址(192.168.56.101)更新了/ etc / hosts。

$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 flippy 192.168.56.101 dev.mysite.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

我可以SSH进入虚拟机,但我不能通过IP地址(192.168.56.101)访问它,也不能访问域名。

Ping失败:

$ ping 192.168.56.101 PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data. ^C --- 192.168.56.101 ping statistics --- 164 packets transmitted,0 received,100% packet loss,time 166895ms

curl失败:

FFmpeg直播stream错误:ffmpeg av_interleaved_write_frame断开的pipe道。 转换失败

如何使用emacs访问Windows共享文件夹

为什么涓stream实用程序不会影响我的dynamic链接的golang程序?

指定了无效的无效选项

在Vagrant中使用XDEBUG

$ curl -v 192.168.56.101 * Rebuilt URL to: 192.168.56.101/ * Trying 192.168.56.101... * connect to 192.168.56.101 port 80 failed: Connection timed out * Failed to connect to 192.168.56.101 port 80: Connection timed out * Closing connection 0 curl: (7) Failed to connect to 192.168.56.101 port 80: Connection timed out

此外,主机上的netstat -rn不显示虚拟机IP地址的路由:

$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlp1s0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlp1s0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp1s0

我还能检查什么?

在vagrant和virtualbox中安装符号链接的文件夹

Windows从睡眠中返回后发生InstanceOwnerException

我可以使用malloc和隐式转换replace对open_memstream的调用吗?

Nginx自签名证书在Vagrant虚拟机上不起作用

如何使用Linux Mint Box上的laravel hometead中的apt-get?

我在这里提供了一个答案 ,我相信是相关的,但是我会在这里发布它以及任何其他奇迹进入这个线程寻找一个解决方案。

这听起来很像VirtualBox 5.1.24中的一个bug,它在5.1.26中修复。

这个问题似乎是VirtualBox无法为主机专用的网络创建一个路由导致的。 要检查是否是这种情况,在主机上运行vagrant up ,从终端运行netstat -rn 。 这会在内核的IP路由表中显示可用的路由。 将有几行输出,但其中你应该看到你的私人网络IP看起来像这样:

Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.56.101 0.0.0.0 255.255.255.0 U 0 0 0 vboxnet3

如果你没有看到为这个IP设置的路由,那么你很可能已经被这个bug所困扰了。 升级到Virtualbox 5.1.26解决了我的问题(在Linux上)。但是puphpet.com在主页上说:

官方推荐的Virtualbox版本是5.0.26!

所以你可能想要回滚到那个版本

相关文章

引言 本文从Linux小白的视角, 在CentOS 7.x服务器上搭建一个...
引言: 多线程编程/异步编程非常复杂,有很多概念和工具需要...
一. 宏观概念 ASP.NET Core Middleware是在应用程序处理管道...
背景 在.Net和C#中运行异步代码相当简单,因为我们有时候需要...
HTTP基本认证 在HTTP中,HTTP基本认证(Basic Authenticatio...
1.Linq 执行多列排序 OrderBy的意义是按照指定顺序排序,连续...