我一直在关注这指南,用于在 XAMPP 服务器上配置 SSL 证书,我已在 4433 端口上启用 SSL(以及在遇到错误但没有结果后启用 443 端口,以下配置和错误针对 443 端口)。我已创建证书,并在其中保留通用名称为“mydomain”。我的 httpd-vhosts.conf 文件如下所示
#NameVirtualHost mydomain
<VirtualHost mydomain:8888>
DocumentRoot C:\xampp\htdocs\mydomain
ServerName mydomain
<Directory C:\xampp\htdocs\mydomain>
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
<VirtualHost mydomain:443>
DocumentRoot C:\xampp\htdocs\mydomain
ServerName mydomain
<Directory C:\xampp\htdocs\mydomain>
AllowOverride All
Allow from All
</Directory>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "conf\ssl.crt\mydomain.crt"
SSLCertificateKeyFile "conf\ssl.key\mydomain.key"
<FilesMatch "\.(cgi|shtml|pl|asp|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:\xampp\cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
我也对 httpd-ssl.conf 文件做了相应的更改
#General setup for the virtual host
DocumentRoot "C:/xampp/htdocs/mydomain"
ServerName mydomain
ServerAdmin admin@mydomain
ErrorLog "C:/xampp/apache/logs/error.log"
TransferLog "C:/xampp/apache/logs/access.log"
....
SSLCertificateFile "conf/ssl.crt/mydomain.crt"
但无论我做什么,我都无法摆脱这个错误;
[Thu Dec 13 13:56:25.779456 2018] [core:notice] [pid 5868:tid 400] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Dec 13 13:56:25.779456 2018] [mpm_winnt:notice] [pid 5868:tid 400] AH00418: Parent: Created child process 1940
[Thu Dec 13 13:56:26.231857 2018] [ssl:warn] [pid 1940:tid 416] AH01909: mydomain:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 13 13:56:26.231857 2018] [ssl:warn] [pid 1940:tid 416] AH01909: mydomain:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 13 13:56:26.419057 2018] [ssl:warn] [pid 1940:tid 416] AH01909: mydomain:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 13 13:56:26.419057 2018] [ssl:warn] [pid 1940:tid 416] AH01909: mydomain:443:0 server certificate does NOT include an ID which matches the server name
我有Run as Administrator
,但没有进展。我的servername
和Common name
证书都一样。有人能建议还需要什么才能使 SSL 证书在 XAMPP 上运行吗?