php - 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
我无法启动服务器,当我尝试时出现上述错误
解决方案
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服务。
推荐阅读
- visual-studio - 导航到 Visual Studio 反汇编中的函数
- oauth-2.0 - PowerApps:带有 MS Graph 的自定义连接器:如何在自定义连接器中使用应用程序权限?
- python - 根据现有列和值以编程方式创建 pandas 列
- c++ - 我们可以写一个 C++ 单元测试(不使用工具)来检测一段代码是否没有堆分配?
- python - 如果需要超过 5 秒,则传递一个函数
- c++ - 创建下对角三角形时输出错误
- nestjs - SyntaxError: Unexpected token { import {MigrationInterface, QueryRunner} from "typeorm"
- php - 如何使用 function.php 根据变量是否存在来创建 woocommerce 产品标题?
- swift - 为什么泛型专业化会在泛型函数中丢失
- c# - 线渲染器显示不正确