我刚刚重新安装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控制面板V3.2.1中,单击右上角的“NetStat”按钮。确保端口80没有被任何其他程序使用。然后点击它下面的“Shell”。在shell提示符中发出这个命令;

Apache_Start.bat

或者输入“ap”,然后按tab键两次,这将类似地生成上述命令。 您将看到Apache失败的确切错误。这很可能是虚拟主机配置问题或其他问题。它将显示发生错误的行号。只需要修复这个错误。注意,在RootDocument中,尾随的\也可能是错误的来源。删除任何拖尾""。

其他回答

这对我很有用,我想和大家分享

如果您已经按照本文中的步骤为xampp创建了ssl

打开C: \ xampp \ apache \ conf \额外\ httpd-xampp.conf

检查SSLCertificateFile "crt/site.test/server.crt"

如果网站。在httpd-xampp.conf中的test是不同的,然后检查C:\xampp\apache\crt\#YOUR_SITE_NAME_HERE\。 改变网站。在httpd-xamp .conf中测试#YOUR_SITE_NAME_HERE

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

由于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服务。

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

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

遵循以下步骤:

Open your XAMPP control panel then click its "Config" Choose the "Apache (httpd.conf)" and find this code below and change it into this one: #Change this to Listen on specific IP addresses as shown below #to prevent Apache from glomming onto all bound IP addresses. #Listen 0.0.0.0:80 #Listen [::]:80 Listen 80 # Dynamic Shared Object (DSO) Support Save it (Ctrl + S) After that, go back to the XAMPP control panel and click its config again. Choose "Apache (httpd-ssl.conf)", find this code below, and change it again: # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two # Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" # #Listen 0.0.0.0:443 #Listen [::]:443 Listen 443 Save it (Ctrl + S) Then, click the "config" (note: above the netstat) and click the "service and port settings". Change "Main Port" to 8080 and "SSL Port" to 4433, then save it. Finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off". Uncheck your "Internet Information Services", and then click OK.

只需等待它,您的计算机/笔记本电脑将自动重新启动,并尝试再次打开XAMPP控制面板,然后启动Apache。

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