首页 文章

Apache甚至拒绝更改端口80和端口443

提问于
浏览
0

我已经阅读了一些帖子并试图改变它,但不幸的是没有发生任何变化 .

这是返回的错误:

错误:Apache意外关闭 . 这可能是由于端口被阻塞,缺少依赖性,不正确的权限,崩溃或其他方法的关闭 . 按Logs按钮查看错误日志并检查Windows事件查看器以获取更多线索如果您需要更多帮助,请在论坛上复制并发布整个日志窗口

我试图在端口80和端口443上侦听,但无法打开它 .

我错过了什么?

1 回答

  • 0

    打开 XAMPP Control Panel 并在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**
    

    你看到的地方 xx 如果它当前声明 81 ,则将其更改为 8080 . 端口81通常由少数应用程序使用,以及443因此我默认情况下总是更改为8080,但您的网络可能不同 . 您显然可以使用 netstat 来查看可用的端口 .

    完全重启 XAMPP ,因为Apache非常挑剔,然后再次尝试启动Apache .

相关问题