2

My vagrant setup for the network is config.vm.network :private_network, ip: "192.168.56.101". If I'm accessing a php page with echo $_SERVER['REMOTE_ADDR']; I got 192.168.56.1 as result. The problem now is that I can't ping 192.168.56.1, so also the config for Xdebug with xdebug.remote_connect_back=1 will fail, because Xdebug tries to connect to 192.168.56.1. If I use my normal ip address with xdebug.remote_host=X.X.X.X everything works fine, but I want to use xdebug.remote_connect_back=1. What can I do that it will work?

4

1 回答 1

0

我遇到了同样的问题,然后手动启动了一个 Virtualbox,并意识到自更新以来我没有启动一个 virtualbox,防火墙必须更新。重新启动 virtualbox 后,我可以 ping 192.168.56.1 而不必依赖硬编码的 IP 地址。所以,我的猜测是,你可能有防火墙问题。

于 2013-10-01T04:42:16.623 回答