You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在两台不同房间的电脑上共用同一WAMP Server?

Hey there! I’ve helped lots of folks set up shared WAMP servers across multiple machines, so let’s walk through exactly how to get your two room-separated computers working together smoothly:

1. First, make sure both computers are on the same network

This is non-negotiable—they need to be connected to the same LAN (either via WiFi or Ethernet through the same router/switch). To confirm:

  • On each computer, open Command Prompt (Win+R, type cmd and hit enter)
  • Run ipconfig and check the IPv4 address. Both should be in the same subnet (e.g., 192.168.1.x or 10.0.0.x)
  • If they’re not, double-check your router’s DHCP settings or manually assign static IPs in the same range.
2. Configure the WAMP host computer

This is where the bulk of the setup happens. Let’s break it down:

2.1 Allow Apache to accept external connections

  • Left-click the WAMP icon in your system tray, go to Apache > httpd.conf
  • Find this block of code:
    <Directory "c:/wamp/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local
    </Directory>
    
  • Replace Require local with Require all granted (this lets any device on the network access your WAMP files)
  • Also, verify the Listen 80 line is uncommented (no # at the start). If port 80 is taken by another app (like IIS), change it to something else like Listen 8080

2.2 Enable remote MySQL access (if you need to use databases from the second computer)

  • From the WAMP tray icon, go to MySQL > my.ini
  • Locate bind-address = 127.0.0.1 and change it to bind-address = 0.0.0.0 (this makes MySQL listen for connections from all devices)
  • Next, create a MySQL user that can connect remotely:
    1. Open phpMyAdmin via the WAMP tray menu
    2. Go to the User accounts tab
    3. Click Add user account
    4. Set a username and password, then set Host name to % (this allows access from any IP)
    5. Grant the necessary permissions (e.g., full access to your project database) and click Execute

2.3 Restart WAMP services

Right-click the WAMP tray icon and select Restart All Services to apply all your config changes.

3. Update the host computer’s firewall

Firewalls block external connections by default, so you need to let WAMP through:

  • Open Windows Defender Firewall (or your third-party firewall)
  • Create inbound rules to allow TCP traffic on:
    • Apache’s port (default 80, or 8080 if you changed it)
    • MySQL’s default port 3306
  • Alternatively, when Windows prompts you about allowing WAMP access after your first restart, select "Allow access" and check both Private and Public networks (if applicable)
4. Access WAMP from the second computer
  • First, get the host computer’s local IP: run ipconfig on the WAMP machine and copy its IPv4 address (e.g., 192.168.1.105)
  • On the second computer’s browser:
    • To access the main WAMP dashboard: http://[HOST_IP] (or http://[HOST_IP]:8080 if you changed the port)
    • To access phpMyAdmin: http://[HOST_IP]/phpmyadmin (use the remote MySQL user you created earlier to log in)
    • To access your project: http://[HOST_IP]/your-project-folder-name
5. Pro tips for reliability & security
  • Set a static IP for the WAMP host: If the host’s IP changes after a restart, the second computer won’t be able to connect. You can set this in your router (reserved IP) or manually via Windows’ network settings.
  • Restrict access for security: Instead of Require all granted, you can limit access to only the second computer’s IP with Require ip [SECOND_COMPUTER_IP] or its subnet (e.g., 192.168.1.0/24)
  • If your computers are on separate networks (different routers), you’ll need port forwarding on the host’s router—this is more complex, so start with the same LAN setup first.

内容的提问来源于stack exchange,提问作者Ossama Rafique

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:45:41