我刚刚重新安装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

我怎么解决这个问题?


当前回答

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

其他回答

Apache服务器默认运行在80、443端口上。您的问题是两个端口中的一个或两个都忙。通常Skype或VMware Workstation使用这两个端口。所以,确保它们没有在运行。确保端口在windows上是空闲的最好方法是:

单击“窗口”按钮。 在搜索栏中输入resmon,打开资源监视器resmon.exe。 Open Listening Ports,这将显示打开的已使用端口。 现在您可以看到哪个进程正在使用端口80和443。 然后,您可以从CMD中使用进程的PID(在资源监视器中显示)终止进程,或者直接从任务管理器中终止进程。 使用PID类型Taskkill /PID 26356 /F从CMD中终止进程,其中26356是PID。

如果你正在使用Skype,你会得到这个错误。

只需按Ctrl+Alt+Del goto任务管理器选择Skype,然后单击结束任务,然后返回并启动Apache,一旦Apache启动成功。然后再打开Skype现在都将工作良好。

无需更改任何端口。

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

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

对我来说,万维网发布服务使用的是80端口。我通过在cmd上运行以下命令来杀死它:

net stop http

在那之后,XAMPP运行Apache没有任何问题。

对我来说,这要容易得多。我关闭了本地windows防火墙。然后重新加载comp启动xampp并再次启动apache。然后把防火墙重新打开。