我可以在本地网络中使用 Apache 服务器吗?
我想编写一个由坐在不同计算机前的多个用户玩的计算机游戏。为此我想实施 P2P 方法。
现在我考虑以下情况。比方说,我有 6 台计算机构建本地网络。我在每台计算机上安装 Apache Web 服务器。因此,每台计算机都运行一个网站。在这种情况下,我有几个问题:
这些网站的网址是什么?计算机的名称?
apache服务器是否在计算机启动时自动启动?
如果我想使用 PHP 或 Apache 编写“本地”网站就足够了,我是否必须安装额外的东西?
预先感谢您的帮助。
I would like to write a computer game played by several users sitting in front of different computers. For that I would like to implement a P2P approach.
Now I consider the following situation. I have, let say, 6 computers which build a local network. On every computer I install Apache web server. So, every computer runs a web site. In this context I have several questions:
What will be the web addresses of these web sites? Names of the computers?
Does apache server starts automatically whenever computer starts?
Do I have to install something additional if I want to write "local" web-sites using PHP or Apache is sufficient?
Thank you in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,除非您的“本地”网站(有时称为 Intranet)有依赖于它的应用程序。
只要获得一个好的 LAMP 或 WAMP 堆栈,就可以了。
您还必须在服务器上配置防火墙,这又取决于平台。
Nope, unless your "local" website, sometimes called intranets, has an application that depends on it.
Just get a good LAMP or WAMP stack, and you're set.
You will also have to configure firewalls on the servers, this again is platform dependent.
在我的网络中,我的服务器上有一个 apache 服务器。我的服务器称为“服务器”,因此我只需输入其他工作站
http://server
。其他提示是将此分辨率放入您的主机文件中:IP 只是一个示例,如果您有三个工作站并想要访问它们,如下所示:
您将在主机文件中:
所以...
1) 是的,如果您设置了主机文件中的计算机名称就像我上面所说的那样
2) 如果注册为服务,Apache 将自动启动。
3)是的。 Apache是你使用PHP编写本地网站所需要的(如果你也想要MySql,那么安装它)
In my network I have on my server an apache server. My server is called "server", so I just type in others workstations
http://server
. Other tip is put in your host files this resolution:The IP is just an example, if you have three workstations and want to access them like:
You would have in your host files:
So...
1) Yes, if you set your computers name in your host files like I said above
2) Apache will start automatically if is registered as a service.
3) Yes. Apache is what you need to write local websites using PHP (If you want MySql too, then install it)