如何在没有互联网连接的情况下通过局域网访问运行 apache 服务器的站点

编程入门 行业动态 更新时间:2024-10-28 15:19:51
本文介绍了如何在没有互联网连接的情况下通过局域网访问运行 apache 服务器的站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 EasyPhp 在 Windows XP SP2 计算机上运行服务器.让我们称它为computer_1.电脑的ip地址是192.168.1.2

I am running a server on Windows XP SP2 computer using EasyPhp. Lets call it computer_1. The ip address of computer is 192.168.1.2

现在我在局域网上有另一台计算机(computer_2),IP 地址为 192.168.1.3

Now I have another computer ( computer_2) on the lan with ip address 192.168.1.3

我想从计算机_2 访问计算机_1 上的站点.

I want to access the site on computer_1 from computer_2.

电脑_2可以ping电脑_1(ping 192.168.1.2有效)

comupter_2 can ping computer_1 (ping 192.168.1.2 works)

但是当我在 computer_2 的浏览器中输入 http://192.168.1.2 时,没有任何反应.

But when I type http://192.168.1.2 in the browser of computer_2, nothing happens.

我想从 computer_2 访问 comupter_1 上的站点.

I want to access the site on comupter_1 from computer_2.

推荐答案

在你的 httpd.conf 中确保你有:

In your httpd.conf make sure you have:

Listen *:80

如果您使用的是 VirtualHosts,请按如下所示进行设置:

And if you are using VirtualHosts then set them as given below:

NameVirtualHost *
<VirtualHost *>
   ...
</VirtualHost>

这篇关于如何在没有互联网连接的情况下通过局域网访问运行 apache 服务器的站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 01:56:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/973450.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:互联网   局域网   情况下   站点   服务器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!