当我使用 VMware Workstation 时,我可以从主机访问访客服务器的本地主机吗?
我是linux和apache服务器配置的新手,所以请给我一些建议。
我在WinXP中安装了VMware并安装了CentOS5。在我的 CentOS 中设置 Apache 服务器后,我可以从我的 CentOS 访问该服务器(当然)。但有没有办法从我的 Windows 访问它?
我认为如果正确设置一些 ip 地址和 apache 配置,这绝对是可能的......
I'm newbie to the linux and apache server configuration so please give me some advice.
I installed VMware in my WinXP and installed CentOS5 to it. After I set up Apache server in my CentOS, I can access that server from my CentOS(of course). But is there a way to access that from my Windows?
I think that is definitely possible if some ip address and apache configuration is set properly...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
进入虚拟机上的设备设置并确保您的以太网适配器设置为桥接。
在centOS中刷新eth0接口并运行“ifconfig”以获取IP地址。
那时,您应该能够将 IP 放入主机上的浏览器中,然后就可以开始了。
Go into the device settings on the VM and make sure your ethernet adapter is set to bridged.
Refresh the eth0 interface in centOS and run 'ifconfig' to get the IP address.
At that point you should be able to just throw the IP into a browser on the host machine and be good to go.
您需要确保已向虚拟机添加了 VMNetwork(网络适配器),并且 VMNetwork 必须能够使用您的主机网卡。如果您有 dhcp 服务器(常见于家用 DSL 路由器),那么您的 VM Guest 应从中获取 IP 地址。然后您应该能够启动 apache,然后通过收到的 dhcp 地址浏览到它。
You need to make sure you have added a VMNetwork, a network adapter to the VM, and that the VMNetwork is one that is bound to being able to use your Host network card. If you have a dhcp server (common from a household DSL router), then your VM Guest should get an IP address from it. Then you should be able to start apache and then browse to it by the dhcp address received.