XAMPP Apache与多个SSL主机问题


XAMPP Apache with multiple SSL hosts issue

我试图在同一本地服务器上为两个不同的站点运行两个SSL主机。

一个

就可以了

http-ssl.conf

<VirtualHost *:443>
 ServerName drupal.local
 DocumentRoot C:'xampp'htdocs'drupal'code'drupal
 SSLEngine on
 SSLCertificateFile C:'xampp'apache'conf'ssl.crt'server.crt
 SSLCertificateKeyFile C:'xampp'apache'conf'ssl.key'server.key
</VirtualHost>

然而,当我添加另一个主机时,我在apache错误日志中得到以下错误

[Mon Jul 06 15:26:19.768431 2015] [ssl:warn] [pid 10672:tid 260] AH01909: anchor.local:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:19.768431 2015] [ssl:warn] [pid 10672:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:19.818431 2015] [core:warn] [pid 10672:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Jul 06 15:26:19.978431 2015] [ssl:warn] [pid 10672:tid 260] AH01909: anchor.local:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:19.978431 2015] [ssl:warn] [pid 10672:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:20.008431 2015] [mpm_winnt:notice] [pid 10672:tid 260] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 configured -- resuming normal operations
[Mon Jul 06 15:26:20.008431 2015] [mpm_winnt:notice] [pid 10672:tid 260] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Mon Jul 06 15:26:20.008431 2015] [core:notice] [pid 10672:tid 260] AH00094: Command line: 'c:''xampp''apache''bin''httpd.exe -d C:/xampp/apache'
[Mon Jul 06 15:26:20.018431 2015] [mpm_winnt:notice] [pid 10672:tid 260] AH00418: Parent: Created child process 7984
[Mon Jul 06 15:26:20.728431 2015] [ssl:warn] [pid 7984:tid 272] AH01909: anchor.local:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:20.728431 2015] [ssl:warn] [pid 7984:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:20.938431 2015] [ssl:warn] [pid 7984:tid 272] AH01909: anchor.local:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:20.938431 2015] [ssl:warn] [pid 7984:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jul 06 15:26:20.968431 2015] [mpm_winnt:notice] [pid 7984:tid 272] AH00354: Child: Starting 150 worker threads.
触发错误的配置看起来像
<VirtualHost *:443>
 ServerName anchor.local
 DocumentRoot C:'xampp'htdocs'anchor-2.6.4'code'drupal
 SSLEngine on
 SSLCertificateFile C:'xampp'apache'conf'ssl.crt'server.crt
 SSLCertificateKeyFile C:'xampp'apache'conf'ssl.key'server.key
</VirtualHost>
<VirtualHost *:443>
 ServerName test.local
 DocumentRoot C:'xampp'htdocs'code'
 SSLEngine on
 SSLCertificateFile C:'xampp'apache'conf'ssl.crt'server.crt
 SSLCertificateKeyFile C:'xampp'apache'conf'ssl.key'server.key
 </VirtualHost>

我试过在不同的端口上运行SSL,但没有任何结果。

感谢您的帮助。

您需要确保服务器id和SSL id相同