XAMPP 在 windows。 Apache 意外关闭。阿帕奇没有启动

XAMPP on windows. Apache Shutdown Unexpectedly. Apache not starting

这是端口已被其他应用程序使用的常见问题。但是我已经纠正了 skype 使用端口 80 和 443 的问题。但是我不确定还有什么应用程序可能会阻止 apache 运行。

这是错误日志

Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash or a shutdown by another method.
Press the Logs button to view error logs and check.
the Windows Event Viewer for more clues.
IF you need more help,
copy and post this entire log window in the forum

我已经检查了错误日志文件。如果有人愿意向我解释这个问题,那就太好了。我刚开始使用 xampp

[Mon Jan 11 15:41:31.711045 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:33.542795 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:37.708844 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Mon Jan 11 15:41:37.709343 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Mon Jan 11 15:41:37.709343 2016] [core:notice] [pid 6344:tid 768] AH00094: Command line: 'D:\xampp\apache\bin\httpd.exe -d D:/xampp/apache'
[Mon Jan 11 15:41:37.963876 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00418: Parent: Created child process 5008
[Mon Jan 11 15:41:44.877326 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.246564 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.644423 2016] [mpm_winnt:notice] [pid 5008:tid 688] AH00354: Child: Starting 150 worker threads.

好吧,如果您阅读来自 Apache 的消息,很明显您已尝试激活 SSL,但您的操作存在问题。

我认为来自 XAMPP 的这部分错误消息最相关 a crash or a shutdown by another method.

假设您通过取消注释 httpd.conf 中的 Include conf/extra/httpd-ssl.conf 行来完成此操作,然后再次注释掉该行,然后尝试修复您的 SSL 配置。

按照错误消息的建议,查看 Windows 事件查看器。 Apache 在那里写入以及它的日志文件。有时,事件查看器中显示的错误具有很强的描述性,并且会在存在错误的配置文件中标识行号

RE 您的评论:

我之前在我的系统上安装了 xamp。我删除了 xampp 的源文件夹并重新安装 xampp

可能是因为您没有卸载旧版本 XAMPP 旧版本的某些内容仍然在您的系统中注册,这就是导致这种奇怪情况的原因。

我会卸载此 XAMPP(正确地),然后检查您是否仍然注册了 Apache and/or MYSQL 服务,使用服务管理单元查看。

如果它们仍然存在,您可以像这样删除它们 (sc delete):-

Start command window using "Run as Administrator"
sc delete MYSQL
sc delete Apache

确保您已备份所有数据库,尽管这可能已经太晚了。

然后您可以re-install您想要使用的XAMPP版本。