XAMPP HTTPS 配置在启动 Apache 时显示错误

XAMPP HTTPS config show errors when start Apache

我遇到了一些奇怪的问题。

现在我想在我的电脑上运行 https vhost apache server,所以我设置了httpd.conf, httpd-ssl.conf, httpd-vhosts.conf.

但是当 运行 apache 时,它​​无法启动并显示以下错误。

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

所以我把端口改成了4433,还是一样的错误

这些是我的配置。

<VirtualHost my.com:4433>
    ServerAdmin admin@example.com
    DocumentRoot "D:/Work/Project/Source/public"
    ServerName my.com:4433
    ServerAlias my.com:4433
    ErrorLog "C:/xampp/apache/logs/my/error.log
    CustomLog "C:/xampp/apache/logs/my/access.log"
    SSLEngine on

    SSLCertificateFile "D:/Work/Project/Data/Certificate/server.cert"

    SSLCertificateKeyFile "D:/Work/Project/Data/Certificate/server.key"
</VirtualHost>

我还解锁了端口 443 和 4433。

请帮我解决这个问题。

找到原因了。 ErrorLog 和 CustomLog 是不存在的路径。

ErrorLog "C:/xampp/apache/logs/my/error.log
CustomLog "C:/xampp/apache/logs/my/access.log"

如下修复后,它运行良好。

ErrorLog "C:/xampp/apache/logs/error.log"
TransferLog "C:/xampp/apache/logs/access.log"

谢谢!