[故障解决]图文:windows apache无法启用 端口被占用

windows apache无法启用 端口被占用

1 XAMPP Error: Apache shutdown unexpectedly

  • 无法启动apache,显示的log为:
    1154696-20170725143629630-549408483.png

2 查了一下端口, 通常是80端口 但是也需要别的端口的

通过运行apache/bin/httpd.exe 打印如下log:
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:443
443端口被占用,apache无法监听443端口,该如何解决呢?

3 关闭占用443端口的进程:

  • netstat -ano查看 443端口被占用
  • 通过cmd中打印tasklist,查找 占用443端口的进程
    • 如果进程比较多,使用netstat –ano|findstr “port”
    • 查看80端口 netstat –ano|findstr 80
    • 查看443端口 netstat –ano|findstr 443
  • taskkill /pid 端口号 杀掉此进程
    • 进程关闭不掉,强制关闭 taskkill /pid 端口号 /F
  • XAMPP重启apache即可。

转载于:https://www.cnblogs.com/viviwong345/p/7233951.html

原文地址:https://www.cnblogs.com/twodog/p/12139861.html