通过 LAN 网络从另一台计算机访问 localhost (xampp) - 如何? [英] Accessing localhost (xampp) from another computer over LAN network - how to?

查看:31
本文介绍了通过 LAN 网络从另一台计算机访问 localhost (xampp) - 如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在家里设置了 wi-fi 网络.我的台式电脑 (192.168.1.56) 上有我的所有文件,我想从另一台电脑 (192.168.1.2) 访问那里的 localhost.

I have just set up a wi-fi network at home. I have all my files on my desktop computer (192.168.1.56) and want to access localhost over there from another computer (192.168.1.2).

在我的桌面上,我可以通过普通的 http://localhost 访问 localhost.Apache 照常在端口 80 上运行.

On my desktop I can access localhost through the normal http://localhost. Apache is running on port 80 as usual.

我究竟需要做什么才能实现这一目标?网络上有文档,但它们要么不起作用,要么过于碎片化,难以理解.

Exactly what do I have to do to achieve this? There is documentation on the net but they either don't work or are too fragment and confusing to understand.

我想我必须对我的 apache 的 httpd.conf 文件和主机文件进行更改.关于要进行哪些更改的任何想法?

I think I have to make changes to my apache's httpd.conf file and the hosts file. Any ideas as to what changes to make?

推荐答案

Localhost 只是为环回提供的名称,例如,它就像将自己称为我"..

Localhost is just a name given for the loopback, eg its like referring to yourself as "me" ..

要从其他计算机查看,您可能只需要http://192.168.1.56http://myPcsName 如果这不起作用,则可能是您的计算机上运行了防火墙,或者 httpd.conf 仅在侦听在 127.0.0.1

To view it from other computers, chances are you need only do http://192.168.1.56 or http://myPcsName if that doesnt work, there is a chance that there is a firewall running on your computer, or the httpd.conf is only listening on 127.0.0.1

这篇关于通过 LAN 网络从另一台计算机访问 localhost (xampp) - 如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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