【问题标题】:xampp not working, and error appears when I try to start my serverxampp 不工作,当我尝试启动服务器时出现错误
【发布时间】:2018-12-15 15:59:09
【问题描述】:
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 监听的端口?尝试将其设为 8080 而不是 80。

标签: php html mysql xampp


【解决方案1】:

打开XAMPP控制面板并选择Apache下的Config。选择您的 httpd.conf 并找到以下行。

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80 
Listen **xx**

如果当前状态为 81,则在您看到 xx 的位置将其更改为类似 8080 的内容。 81 端口是少数应用程序常用的,所以我倾向于默认更改为 8080,但您的网络可能会有所不同。您可以使用netstat 查看您可以使用哪些端口。

完全重新启动 XAMPP,因为 Apache 非常麻烦,然后尝试重新启动 Apache。

【讨论】:

    【解决方案2】:

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

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

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

    听 80

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

    听 8080

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

    服务器名称 localhost: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 文件中,找到另一行显示

    服务器名称 localhost:443

    并将 443 更改为 4433。

    服务器名称 localhost:4433

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

    P.S:重启 Apache 服务。

    猜你喜欢
    • 1970-01-01
    • 2012-06-05
    • 2020-11-13
    • 1970-01-01
    • 1970-01-01
    • 2015-12-20
    • 2019-08-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多