如何将两台电脑与单个 Wamp 服务器连接

how to Connect two pc with single Wamp server

实际上我们正在 PHP 开发一个新网站。那么是否有可能创造一个环境,让我们可以分享我们所做的工作。

in simple One wamp and two pc connected with lan is possible or not ? if it is how??

if 运行 xampp 或 wamp (apache),如果 Dmz(调制解调器选项)将数据包转发到 wamp 运行 的 pc(LAN IP 地址:exp:192.168.x.x) You Can Use His Remote Ip address To See (wamp/xampp) Root Directory .

在您的 VHOST 定义中应该有一个 <Directory ......</Directory> 参数

在里面添加

如果您使用的是 Apache 2。2.x

    Allow from 192.168.1

如果您使用的是 Apache 2。4.x

    Require ip 192.168.1

这将允许任何以 192.168.1 开头的 IP 地址连接到该 VHOST

如果你想要具体并且只允许特定的 ip,你可以使用它来代替

Allow from 192.168.1.10 192.168.1.11

或者,如果您使用的是 Apache 2.4

Require ip 192.168.1.10 192.168.1.11

所以你的 VHOST 应该是这样的

<VirtualHost *:80> 
   DocumentRoot "C:/xampp/htdocs/countlead" 
   ServerName domain.com 
   ServerAlias www.domain.com
   <Directory  "C:/xampp/htdocs/countlead">
      AllowOverride All
      Require local
      Require ip 192.168.2
   </Directory>
</VirtualHost>