我刚刚重新安装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 10。 我从xampp目录运行apache_start.bat,我得到了一个更具体的反馈,说我的https-vhosts.conf文件上有一个错误,特别是在文档根目录的末尾有一个额外的\。把它拿开,它又工作了。

其他回答

我的问题是在httpd.conf中的DocumentRoot和<Directory>条目指向不存在的文件夹。

例如,'原始' httpd.conf有以下条目:

DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">

如果您已经安装在C:\xampp中,那么您需要更改这些条目以匹配。

DocumentRoot "c:/xampp/htdocs"
<Directory "c:/xampp/htdocs">

你可以采用上面提到的解决方案。这个问题可以通过修改你的“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!

感谢和问候 阿卡纳

对我来说,这个问题始于我在Windows 8电脑上托管vpn连接时。

简单地删除连接从“控制面板\网络和互联网\网络连接”解决了这个问题。

你可以在XAMPP目录下运行apache_start.bat文件查看你的错误细节。

首先,您应该验证httpd-vhosts文件中没有多余的虚拟主机。我的意思是遵循简单的规则:在配置文件中,1个项目= 1个虚拟主机。否则,即使您更改端口等,也会面临错误。