🎉🏆🎉

恭喜你完成網站架設!

Congratulations! You've deployed your website!

C:\WINDOWS\system32\cmd.exe ─☐✕
you $ python -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 ...
you $ 快看!我的網站上線了! Look, my site is live!
everyone $ curl http://localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused
everyone $
C:\WINDOWS\system32\cmd.exe ↻─☐✕
FAQ:為什麼別人打不開我的 localhost? / Why can't others open my localhost?

為什麼別人打不開我的 http://localhost:8000?

localhost(127.0.0.1)永遠指向「正在瀏覽的那台電腦」。你打開 localhost:8000 看到的是你自己電腦上的伺服器;別人打開同一個網址,找的是他自己電腦的 8000 埠,那裡什麼都沒有,所以只會看到 Connection refused 或 ERR_CONNECTION_REFUSED。

localhost:8080、localhost:3000、localhost:5173 也一樣嗎?

一樣,差別只有埠號:8000 常見於 python -m http.server 與 Django,8080 常見於 Tomcat 與各種代理,3000 是 React/Next.js 開發伺服器,5173 是 Vite。無論哪個埠,localhost 網址都只有你自己打得開。

要怎麼讓別人真的看到我的網站?

把網站部署到公開的主機上:靜態網站可用 Cloudflare Pages、GitHub Pages、Netlify 等免費服務;要臨時展示本機開發中的網站,可用 ngrok、cloudflared tunnel 之類的工具把 localhost 暫時開放到公網。

localhost8000.tw 是什麼?

本站為迷因惡搞用途,獻給每一位興奮地把 http://localhost:8000 貼給別人看的 vibe coding 工程師。頁面上的終端機與連線紀錄皆為演出效果;顯示的 IP 只在你的瀏覽器本地產生與顯示,不會被傳送、記錄或儲存。

This is a parody site. The terminal is theatrical; the IP shown is generated and displayed locally in your browser only — never sent, logged, or stored.