hexo http://localhost:4000 打不開

port 被占用

查 port 被占用情形

1
2
netstat -ano | findstr 0.0:4000
TCP 0.0.0.0:4000 0.0.0.0:0 LISTENING 5976

查被誰占用

1
2
tasklist | findstr 5976
Code.exe 5976 Console 1 92,008 K

變更連接埠

1
hexo server -p 5000



localhost 的 http 網站被強制導向 https(edge適用)

開啟瀏覽器

1
2
chrome://net-internals/#hsts
edge://net-internals/#hsts

到最下方找到 Delete domain security policies 設定,輸入localhost按下Delete