首页 > 解决方案 > xampp 不工作,当我尝试启动我的服务器时出现错误

问题描述

Error: Apache shutdown unexpectedly.
11:58:07  [Apache]  This may be due to a blocked port, missing dependencies, 
11:58:07  [Apache]  improper privileges, a crash, or a shutdown by another method.
11:58:07  [Apache]  Press the Logs button to view error logs and check
11:58:07  [Apache]  the Windows Event Viewer for more clues
11:58:07  [Apache]  If you need more help, copy and post this
11:58:07  [Apache]  entire log window on the forums

我无法启动服务器,当我尝试时出现上述错误

标签: phphtmlmysqlxampp

解决方案


Apache 默认使用 80 端口,如果该端口已被其他程序占用,可能会导致此问题。以下步骤可解决此问题:

第 1 步- 从 XAMPP 控制面板的 Apache 下,单击 Config 按钮,然后选择 Apache (httpd.conf)。

在 httpd.conf 文件中,不知何故我发现了一行:

听 80

并将 80 更改为您想要的任何数字/端口。在我的场景中,我使用的是 8080 端口。

听8080

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

服务器名称本地主机:80

将 80 更改为 8080。

服务器名称 localhost:8080

完成更改后保存 httpd.conf 文件

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

听着 443

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

听4433

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

服务器名称本地主机:443

并将 443 更改为 4433。

服务器名称 localhost:4433

完成更改后保存 httpd-ssl.conf 文件

PS: 重启Apache服务。


推荐阅读