我刚刚重新安装XAMPP,当我试图在XAMPP控制面板中启动我的Apache服务器时,我现在得到以下错误:

16:50:25  [Apache]     Status change detected: running
16:50:26  [Apache]     Status change detected: stopped
16:50:26  [Apache]     Error: Apache shutdown unexpectedly.
16:50:26  [Apache]     This may be due to a blocked port, missing dependencies,
16:50:26  [Apache]     improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]     Press the Logs button to view error logs and check
16:50:26  [Apache]     the Windows Event Viewer for more clues
16:50:26  [Apache]     If you need more help, copy and post this
16:50:26  [Apache]     entire log window on the forums

我怎么解决这个问题?


当前回答

这对我很管用……

如果你正在使用windows…

在windows搜索栏中搜索'cmd'。

输入:C: \ xampp \ apache \ bin \ httpd.exe

查找发生错误的文件和行。

例如,我的在下面的文件中 第37行。

httpd-multilang-errordoc.conf

打开代码并通过删除该行或修复该行来修复错误。

完成了!我现在该工作了。

:)

其他回答

在我的情况下,端口已经被windows IIS服务使用。 您可以从cmd检查端口是否已被使用。打开cmd,执行如下命令:

netstat -ano

如果IIS正在使用它,可以通过以下命令停止它。以管理员身份打开cmd,然后:

iisreset /stop

现在尝试运行XAMPP,它应该可以工作。

最好的解决方案

打开XAMPP控制面板,单击Apache的config,然后单击Apache(httpd.config)。现在在文本编辑器中。ctrl+f—>找到“Listen 80”,并将其替换为“Listen 8079”,不带引号:) 但是现在你必须像这样使用它http://localhost:8079/

p.s.,我试图改变skype的端口设置,停止我在windows 10中找不到的Web部署代理服务,cmd——> net stop http和其他方法,但除了这个没有任何工作。

你可以采用上面提到的解决方案。这个问题可以通过修改你的“httpd.conf”(C:\xampp\apache\conf\httpd.conf)文件和“httpd-ssl.conf”(C:\xampp\apache\conf\extra\httpd-ssl.conf)文件来解决。 如果问题仍然存在,你可以检查你的skype端口。

But in my case this was different. I had to make changes in "server.crt"(C:\xampp\apache\conf\ssl.crt\server.crt) file.Try running your xammp apache from the command line in administration mode. "C:\xampp\apache\bin\httpd.exe" This will give you the errors -in which file and -which line. Likewise, I had an error in server.crt file which was blank. If you have xammp running in any other system, just copy the contents of this file(C:\xampp\apache\conf\ssl.crt\server.crt) and paste in your server.crt file and You are Done!

感谢和问候 阿卡纳

我收到了上面相同的错误,导致我的原因是在文件'httpd-vhosts.conf'中,我在<Directory>标签中放了一个注释,就像这样…

<Directory "*PATH TO MY FOLDER*...">
        AllowOverride All
        Require all Granted    ## This directive could/should be set to denied.
</Directory>

一旦我删除了注释,Apache就启动了。我想我应该把注释放在它自己的行里。我只是想,像其他网络代码一样,它可以在那里。

通常,xampp端口错误发生是因为另一个应用程序正在使用xampp试图访问的默认端口80。大多数时候这个应用程序就是Skype。 所以,你有两种方法来解决这个问题:

关闭或终止正在使用该端口的进程/应用程序。 为xampp应用程序使用其他端口。(我个人更喜欢这种方法)。

这些方法在这篇文章中很好地解释了如何调试xampp端口80错误