如何从局域网中的另一台 PC 访问我的本地主机? [英] How to access my localhost from another PC in LAN?
问题描述
我正在使用 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.
例如:听 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屋!