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

我怎么解决这个问题?


当前回答

试试下面的方法,上面的方法都不能解决我的问题

选择“以管理员身份运行”

然后点击Apache旁边的左边大框

并选择卸载Apache

我不知道为什么这样做,但它直接解决了我的问题!

其他回答

试试下面的方法,上面的方法都不能解决我的问题

选择“以管理员身份运行”

然后点击Apache旁边的左边大框

并选择卸载Apache

我不知道为什么这样做,但它直接解决了我的问题!

遵循以下步骤:

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。

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

如果您已经按照本文中的步骤为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

发生这种情况是因为默认端口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 /…

我收到了上面相同的错误,导致我的原因是在文件'httpd-vhosts.conf'中,我在<Directory>标签中放了一个注释,就像这样…

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

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