80改完之后,还是不行,后面发现居然443也要改!
xampp启动时显示的错误为:
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file
9:52:42 [Apache] and the Windows Event Viewer for more clues
这个问题比较常见, 通常是80、443端口被占用
cmd 通过运行apache/bin/httpd.exe 打印如下log:
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:443
或者后面是80端口被占用
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:80 或[ : : ]:80
一、最快的处理方法就是修改端口号:
1、443端口被占用,apache无法监听443端口,该如何解决呢?
在/xampp/apache/conf/extra/httpd-ssl.conf
把Listen 443 修改为 444(可自定义)
2、80端口被占用,apache无法监听80端口,该如何解决呢?
在/xampp/apache/conf/extra/httpd.conf
把Listen 80 修改为 88 (可自定义)
如果配置了vhosts的话请把httpd-vhosts.conf 中端口改为88(同上端口号)
二、最直接的方法是关闭占用80、443端口的进程:
1. 通过cmd中netstat -ano 看看本机80、 443端口被占用没 ----- --这里 可能会被其他程序占用如iis、虚拟机等
2.通过cmd中打印tasklist,查找占用80、443端口的进程名称。
3.taskkill /pid 端口号 杀掉此进程名称,XAMPP重启apache即可。
综上所述第一种方法推荐使用,第二种每次启动都或多或少的再次遇到。
-
顶
-
踩
-
猜你在找
8楼 qq_366459782016-11-08 11:14发表 [回复]-
-
在/xampp/apache/conf/extra/httpd.conf
把Listen 80 修改为 88 (可自定义)
我怎么没有httpd.conf 这个文件呐?
Re: qq_366459782016-11-08 11:30发表 [回复]-
-
回复qq_36645978:找到了,是在/xampp/apache/conf目录下
7楼 qq_303286392016-07-29 19:44发表 [回复]-
-
一招制胜,爽
6楼 baidu_342723182016-05-29 10:48发表 [回复]-
-
说是端口占用,但我的端口都改了,怎么还是不可以启动?我就是很久之前安装过Apache,后来又卸载了,是不是这个原因影响?急急,楼主,我该怎么解决?
Re: MR_Teen2016-06-03 17:26发表 [回复]-
-
回复baidu_34272318:方法一、请查看 服务里是否注册开机自动启动
win+R -> services.msc ->查看服务
方法二:
1、开始 -> 运行 -> cmd
2、你可以用netstat -ano 查看一下本机端口,或用 findsstr 端口号
3、用tasklist | findstr 端口(获取步骤2里面的端口,实际就是拿到了pid)
4、taskkill -pid -f 关闭端口服务
5楼 CSDN_laogao2016-05-01 16:59发表 [回复]-
-
谢谢楼主,完美解决
4楼 浅浅无奈2015-11-23 14:52发表 [回复]-
-
谢谢!
3楼 zhanglian5202015-09-18 09:55发表 [回复]-
-
就是这个问题,已解决。
2楼 heydy2014-11-14 07:53发表 [回复]-
-
多谢啦,的确是这个问题呢
1楼 VOSTAR2014-07-16 16:51发表 [回复] [引用] [举报]-
-
谢谢,解决了我的问题!