啟動 Apache 等服務時提示連接埠 80 被佔用,或錯誤日誌出現 Could not reliably determine the server's fully qualified domain name。
netstat -aon | findstr "80"
輸出範例:TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448 → PID 2448 佔用 80 埠。
tasklist | findstr "2448"
輸出範例:thread.exe 2016 Console 0 16,064 K → 確認為 thread.exe。
taskkill /PID 2448 /F。tasklist 查無此 PID,直接在工作管理員「詳細資料」頁籤依 PID 排序尋找。80 替換即可。ServerName 警告非埠衝突問題,修改 httpd.conf 加入 ServerName localhost:80 即可消除。