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

其他回答

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

通常,xampp端口错误发生是因为另一个应用程序正在使用xampp试图访问的默认端口80。大多数时候这个应用程序就是Skype。 所以,你有两种方法来解决这个问题:

关闭或终止正在使用该端口的进程/应用程序。 为xampp应用程序使用其他端口。(我个人更喜欢这种方法)。

这些方法在这篇文章中很好地解释了如何调试xampp端口80错误

当我使用命令发现没有进程使用端口80时

netstat -abno | find ":80"

使用端口80的任何进程都没有问题。

然后我运行命令(在cmd中)

C:\xampp\apache\bin\httpd.exe

它在httpd-vhosts.conf文件中的虚拟主机配置中显示了一些错误,该文件最近由我编辑,用于在Eclipse IDE中的WordPress PHP环境中安装。所以我删除了这些行,Apache开始得很好。

最好的解决方案

打开XAMPP控制面板,单击Apache的config,然后单击Apache(httpd.config)。现在在文本编辑器中。ctrl+f—>找到“Listen 80”,并将其替换为“Listen 8079”,不带引号:) 但是现在你必须像这样使用它http://localhost:8079/

p.s.,我试图改变skype的端口设置,停止我在windows 10中找不到的Web部署代理服务,cmd——> net stop http和其他方法,但除了这个没有任何工作。

发生这种情况是因为默认端口80被Apache阻塞。您需要更改端口或使端口可访问。

转到Apache安装中的Apache配置(httpd.conf)文件。

找到这些台词:

#

听192.168.1.2:80

听80

#

这里192.168.1.2是我的私有IP地址。根据你的改变。

变更如下

听192.168.1.2:8081

听8081

现在,当您访问localhost时,您必须显式地将端口添加为 http://localhost: 8081 /…