今天使用xampp,apache無法啟動,由於使用xampp-control-3-beta.exe無法看到錯誤,就是無法啟動。
windows用cmd,執行xampp/apache/bin中的httpd.exe,看到:
- (OS 10048)通常每個套接字地址(協議/網絡地址/端口)只允許使用一次。 : make_sock: c
- ould not bind to address [::]:443
-
查找端口占用
- D:\server\xampp\apache\bin>netstat -ano|findstr "443"
- TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3120
- TCP 199.10.33.30:54312 202.173.27.250:443 TIME_WAIT 0
- TCP 199.10.33.30:54313 216.219.120.244:443 TIME_WAIT 0
查看進程占用程序
- D:\server\xampp\apache\bin>tasklist|findstr "3120"
- vmware-hostd.exe 3120 Services 0 55,356 K
可見433由vmare占用,根據“先來后到”的原則,那么只有更改apache的這個端口了。
解決方法進入Apache的安裝目錄,搜索httpd-ssl.conf,右擊文本打開。尋找443替換成其他不常用的端口號,比如442。接下來就可以正常啟動Apache了。