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

我怎么解决这个问题?


当前回答

下载新的xampp apachefriends 安装它 删除所有VPN应用程序 打开XAMPP文件夹运行setup_xampp.bat 运行xampp-control.exe

其他回答

我试图在cmd中执行httpd.exe,得到错误,在httpd-vhosts.conf中有语法错误。 我检查了文件,发现了什么问题,现在工作正常。

所以,如果你面临这个错误,那么它可能是因为httpd-vhosts或任何其他文件。

尝试通过cmd执行程序,您将得到错误细节和语法错误所在行。

祝你好运

步骤1:在Apache进入Config,然后选择Apache(httpd.conf)

在记事本中,找到Listen 80并添加另一个80以将端口更改为Listen 8080

请确保在关闭记事本之前保存。

步骤2:在Apache中选择Apache(httpd-ssl.conf)

在记事本中,找到Listen 443,并在443之后再添加3,将端口更改为Listen 4433

然后搜索“VirtualHost default:443”,再添加3,将端口修改为“VirtualHost default:4433”

请确保在关闭记事本之前保存。

(注:这里有一个类似的答案,但它并不适用于我,直到我喜欢YT的视频)

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

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

net stop http

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

由于我在一个开发人员面临防火墙问题的企业环境中工作,其他答案都不能解决我的问题。

由于Skype不使用该端口,而是由其他一些内部应用程序使用, 我按照以下步骤来解决这个问题:

步骤1 -从XAMPP控制面板,在Apache下,单击Config按钮,并选择Apache (httpd.conf)。

在httpd.conf文件中,我发现了一行说:

Listen 80

然后把80换成任何你想要的数字/端口。在我的场景中,我使用端口8080。

Listen 8080

仍然从httpd.conf文件,我发现另一行说:

ServerName localhost:80

将80修改为8080。

ServerName localhost:8080

步骤2 -从XAMPP控制面板,在Apache下,再次单击Config按钮,但这次选择Apache (httpd-ssl.conf)。在httpd-ssl.conf文件中,找到这样一行

Listen 443

并将443更改为您想要的任何数字/端口。我将使用4433作为新的端口号。

Listen 4433

仍然从httpd-ssl.conf文件中,找到另一行说

<VirtualHost _default_:443>

ServerName localhost:443

将443改为4433。

<VirtualHost _default_:4433>

ServerName localhost:4433

记得在进行一些更改后保存httpd.conf和httpd-ssl.conf文件。然后重新启动Apache服务。