在XAMPP中打开Apache,结果报错

在XAMPP中打开Apache,结果报错

img

下面是日志
[Sat Mar 11 15:27:23.520942 2023] [:emerg] [pid 7172:tid 340] AH00020: Configuration Failed, exiting
[Sat Mar 11 15:27:24.833133 2023] [ssl:warn] [pid 12736:tid 328] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Mar 11 15:27:24.864376 2023] [core:warn] [pid 12736:tid 328] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Mar 11 15:27:24.864376 2023] [ssl:warn] [pid 12736:tid 328] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: 'C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll' 14.15 is not compatible with this PHP build linked with 14.29 in Unknown on line 0
[Sat Mar 11 15:27:24.879997 2023] [:emerg] [pid 12736:tid 328] AH00020: Configuration Failed, exiting

服务器证书也不对,配置也不对。

已经解决,根据https://www.wbolt.com/xampp-server-certificate-error.html 解决服务器证书。然后把system32里的VCRUNTIME140.dll文件的文件名改成VCRUNTIME140_old.dll放到apache\bin文件夹下,重启Apache就可以了。