我正在虚拟框中运行 python SimpleHTTPServer。是否可以从主机访问它? 在我的主机中运行 ipconfig 给出了以下地址。我尝试在主机的浏览器中使用它,但这似乎不起作用。 我应该查看不同的 IP 地址吗?
$> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter VirtualBox Host-Only Network #2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : xx:xx:xx:xxxx:xxx:xxxx
IPv4 Address. . . . . . . . . . . : 192.168.99.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
最佳答案
虚拟盒中的端口转发帮助解决了问题。
关于python - 从 Virtual Box 外部访问 python SimpleHTTPServer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40616657/