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

XAMPP搭建的个人网站仅本地WiFi可访问,寻求解决方案

Hey there! Let’s figure out why your site is only reachable on your local WiFi and get it fixed up. Here’s a step-by-step breakdown of the most common issues and how to check them:

1. Port Forwarding is Almost Certainly the First Thing to Check

Your router needs to know to send incoming web traffic (on ports 80 and 4433) to the local computer running XAMPP. Here’s how to set it up:

  • First, find your computer’s local LAN IP:
    • On Windows: Run ipconfig in Command Prompt, look for "IPv4 Address" (it’ll look like 192.168.x.x)
    • On macOS/Linux: Run ip addr or ifconfig in Terminal to get your local IP
  • Log into your router’s admin panel (usually at 192.168.1.1 or 192.168.0.1—check your router’s manual if unsure)
  • Look for "Port Forwarding" or "Virtual Server" settings, then add two rules:
    • Rule 1: External Port 80, Internal Port 80, Destination IP = your computer’s local LAN IP, Protocol = TCP
    • Rule 2: External Port 4433, Internal Port 4433, Destination IP = same local IP, Protocol = TCP
  • Save the settings and restart your router, then test from an external network (like your phone on cellular data)
2. Check Your Domain’s DNS Points to Your Public IP
  • First, find your public IP: Google "what’s my public IP" to get the address your router uses to connect to the internet
  • Log into your domain registrar’s dashboard, find the DNS settings for www.ioi-xd.xyz, and make sure the A record is pointing to that public IP
  • If your home internet uses a dynamic IP (most do), your public IP might change when you restart your router. In that case, set up a Dynamic DNS (DDNS) service linked to your domain—this will automatically update your DNS record when your public IP changes.
3. Firewalls Might Be Blocking Traffic
  • Local Computer Firewall: On Windows, open Windows Defender Firewall and make sure httpd.exe and httpd-ssl.exe (from XAMPP’s Apache folder) are allowed through. Alternatively, temporarily disable the firewall to test (don’t forget to re-enable it after!)
  • Router Firewall: Some routers have default rules that block incoming external traffic. Check your router’s admin panel for "Firewall Settings" and ensure ports 80 and 4433 aren’t being blocked, or add them to a whitelist.
4. Your ISP Might Be Blocking Port 80

Many home ISPs block port 80 (the default HTTP port) to prevent users from hosting public servers. To test this:

  • Change Apache’s HTTP port in httpd.conf (find the line Listen 80 and change it to something like Listen 8080)
  • Update your port forwarding rule to forward external port 8080 to internal port 8080
  • Try accessing http://www.ioi-xd.xyz:8080 from an external network. If this works, your ISP is blocking port 80—you can either stick with the non-standard port or contact your ISP to ask for an exception (note: some ISPs don’t allow this for residential plans).
5. Double-Check How You’re Testing
  • Never test using your local WiFi—use a device on cellular data or a friend’s network to confirm external access
  • For your SSL setup, remember to specify the port when accessing: https://www.ioi-xd.xyz:4433 (since you’re using 4433 instead of the default 443 SSL port)

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.26 10:13:37