如何从局域网中的另一台PC访问我的本地主机? [英] How to access my localhost from another PC in LAN?

查看:171
本文介绍了如何从局域网中的另一台PC访问我的本地主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WAMP服务器运行我的网站.我正在使用Windows 7.

I am using WAMP server to run my website. I am using Windows 7.

我在两台PC之间创建了LAN,我想从第二台PC访问本地主机.
请注意,我没有使用Internet连接,所以无法使用IP地址.

I created LAN between 2 PC and I want to access my localhost from the second PC.
Note that I am not using Internet connection so I couldn't use IP address.

请给我您的建议.

推荐答案

您必须编辑httpd.conf并找到以下行:Listen 127.0.0.1:80

You have to edit httpd.conf and find this line: Listen 127.0.0.1:80

然后写下您为LAN设置的所需IP.不要使用自动IP.
例如:Listen 192.168.137.1:80

Then write down your desired IP you set for LAN. Don't use automatic IP.
e.g.: Listen 192.168.137.1:80

我将192.167.137.1用作Windows 7的LAN IP.重新启动Apache并享受共享.

I used 192.167.137.1 as my LAN IP of Windows 7. Restart Apache and enjoy sharing.

这篇关于如何从局域网中的另一台PC访问我的本地主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆