我刚刚重新安装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防火墙。然后重新加载comp启动xampp并再次启动apache。然后把防火墙重新打开。

其他回答

In my case I edited the http.conf file for I wanted localhost to be accessible by other computers on the network and did not set a static IP on my network adapter. I also checked netstat and saw nobody was using port 80. So I opened cmd and typed ipconfig I also opened the http.conf and searched(CTRL + F) for "Listen 80". The line above it, if not commented, enables localhost to be accessible over the network. It should look something like this:Listen 192.168.93.3:80 Comparing the result from ipconfig command, I saw that my current ip address isn't the same as the one on the http.conf file. So I changed the ip address on the http.conf file with the one currently assigned to me and it worked.

注意,无论何时更改默认端口,浏览器都不会知道。80和443似乎在某种程度上是标准的,例如,如果您将80更改为8080,那么您将不得不以这种方式访问您的网站:

localhost: 8080 / path_to_your_website.php

我遇到了同样的问题,结果是我忘记运行setup_xampp.bat(可移植版本)。

我通过停止“Web部署代理服务”解决了这个问题。打开:System -> Computer Management -> Services -> Web部署代理服务。停止此服务并启动XAMPP工作。 我想这是MS Webmatrix提供的一项服务。

>系统和保安>管理>服务>网络调送服务

我收到了与OP完全相同的错误消息,但现有的任何答案都没有解决我的问题。许多答案涉及端口80上的冲突,我知道我没有冲突,因为我最近在端口80上有localhost响应。

结果我无意中改变了ServerRoot,当我打算改变DocumentRoot(愚蠢,我知道),虽然新的ServerRoot目录存在,但它不包含配置文件和apache所需的其他东西,这导致它在启动时失败。错误消息可能通过“缺少依赖项”来解决这种情况。

在我的Windows系统上,将ServerRoot设置回C:/XAMPP/apache解决了这个问题。