Php 具有多个SSL主机的XAMPP Apache问题

Php 具有多个SSL主机的XAMPP Apache问题,php,apache,ssl,Php,Apache,Ssl,我正在尝试为同一本地服务器上的两个独立站点运行两个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

我正在尝试为同一本地服务器上的两个独立站点运行两个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>
引发错误的配置如下所示

<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>

ServerName.local
DocumentRoot C:\xampp\htdocs\anchor-2.6.4\code\drupal
斯伦金安
SSLCertificateFile C:\xampp\apache\conf\ssl.crt\server.crt
SSLCertificateKeyFile C:\xampp\apache\conf\ssl.key\server.key
ServerName test.local
DocumentRoot C:\xampp\htdocs\code\
斯伦金安
SSLCertificateFile C:\xampp\apache\conf\ssl.crt\server.crt
SSLCertificateKeyFile C:\xampp\apache\conf\ssl.key\server.key
我已经尝试在不同的端口上运行SSL,但到目前为止什么都没有


非常感谢您的帮助。

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

您尝试过将SSL id与服务器id匹配吗?成功了!加上它作为一个答案,我会接受它。您好,很好,刚刚添加了一个答案,这样人们可以更容易地找到它。非常感谢您抽出时间。。。对于其他正在解决此问题的人,请查找“基于名称的虚拟主机”
<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>