我刚刚重新安装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.conf'中,我在<Directory>标签中放了一个注释,就像这样…

<Directory "*PATH TO MY FOLDER*...">
        AllowOverride All
        Require all Granted    ## This directive could/should be set to denied.
</Directory>

一旦我删除了注释,Apache就启动了。我想我应该把注释放在它自己的行里。我只是想,像其他网络代码一样,它可以在那里。

其他回答

我有一个类似的错误,改变端口或运行为管理员不工作。 我用的是Windows 10。 我从xampp目录运行apache_start.bat,我得到了一个更具体的反馈,说我的https-vhosts.conf文件上有一个错误,特别是在文档根目录的末尾有一个额外的\。把它拿开,它又工作了。

按照这个方法立即解决!

这是来要么它没有访问启动一个服务监听端口

Soln:使用管理员权限

这是因为系统上已经运行了一个端口80,443

Soln:使用netstat -ano |查找“0.0.0.0:443”,然后使用taskkill /pid ENTER_PROCESS_ID /F关闭并重启Apache

搜索正在运行的后台服务,你不需要的可能是mongo,节点服务器等,关闭它们 如果没有工作,打开httpd.conf和httpd-ssl.conf文件,将443替换为4431,将80替换为8080 没有任何工作可能是由于与文件相关的问题,所以再次安装XAMPP在一个没有空间C:\XAMPP的位置

解决! ! ! !

在我的情况下,端口已经被windows IIS服务使用。 您可以从cmd检查端口是否已被使用。打开cmd,执行如下命令:

netstat -ano

如果IIS正在使用它,可以通过以下命令停止它。以管理员身份打开cmd,然后:

iisreset /stop

现在尝试运行XAMPP,它应该可以工作。

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.

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

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