安裝過程彈出錯誤視窗,安裝完成後瀏覽器訪問 localhost 無「It works!」頁面。
安裝程式未成功將 Apache 註冊為 Windows 服務,導致服務不存在、無法啟動、80 埠無監聽。
# 以管理員身分執行 CMD
httpd.exe -k install -n "Apache2.4"
# 若報錯缺少 MSVC 運行庫,安裝 Visual C++ Redistributable
net start Apache2.4
netstat -ano | findstr :80,若被 IIS/系統佔用,停用該服務或修改 httpd.conf Listen 8080。httpd.exe 網路存取。https://localhost/ 或 https://127.0.0.1/。htdocs,測試 。「建議重新安裝下 apache。初學php,使用xampp集成安裝包會更好一點。」