xampp的Apache服务无法启动 Apache的443端口被占用解决方法

  今天在使用本地的XAMPP的时候,发现Apache服务不能正常启动,根据以往的经验,可能是80端口或者443端口被占用导致的,所以对端口占用情况进行排查。

  

  1. 执行xampp/apache/bin中的httpd.exe,看到:

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。  : AH00072: make_sock: could not bind to address [::]:443
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。  : AH00072: make_sock: could not bind to address 0.0.0.0:443
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

  2. 查找端口的占用情况

D:\xampp\apache\bin>netstat -ano|findstr "443"
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       7656

  3. 查看具体的进程

D:\xampp\apache\bin>tasklist|findstr "7656"
vmware-hostd.exe              7656 Services                   0     48,192 K

  根据“先来后到”的原则,443端口被vmare占用。

  两种解决方案,一种是修改apache的这个端口号;另一种是修改vmware的配置参数。

  方案一:

进入Apache的安装目录,D:\xampp\apache\conf\extra\httpd-ssl.conf,右击文本打开。寻找443替换成其他不常用的端口号,比如441。接下来就可以正常启动Apache了

  方案二:

  首先,打开我们的虚拟机,找到菜单里面的编辑选项,选择首选项,如图:

  

  单击“禁用共享”按钮即可。此时虚拟机不可用,Apache可正常使用。

  

   若既不想关闭共享,又想使用Apache,那么接下来不妨这样做,禁用共享以后修改端口,端口只有禁用共享以后才能修改,启用共享后无法修改,如图:

  

    

  参考文献:https://www.iteye.com/blog/congjl2002-1497640

  https://blog.csdn.net/hyhui13/article/details/82777975

  

   

猜你喜欢

转载自www.cnblogs.com/iverson-3/p/11817988.html