我最近为我的域名购买了通配符 SSL 证书,但在 Apache 中配置它时遇到了困难。我的服务器有一个专用 IP 地址,因此我了解到您需要在虚拟主机中引用该 IP 地址。我的配置如下所示:
<VirtualHost 172.16.0.3:443>
ServerName appstore.mydomain.org.uk
DocumentRoot /home/appstore/public_html
<Directory "/home/appstore/public_html">
allow from all
Options +Indexes
</Directory>
SSLEngine on
SSLCertificateFile /home/appstore/certs/mydomain.org.uk.crt
SSLCertificateKeyFile /home/appstore/certs/mydomain.org.uk.key
SSLCertificateChainFile /home/appstore/certs/gs_intermediate_ca.crt
</VirtualHost>
<VirtualHost 172.16.0.3:443>
ServerName blog.mydomain.org.uk
DocumentRoot /home/blog/public_html
<Directory "/home/blog/public_html">
Allow from all
Options +Indexes
</Directory>
SSLEngine on
SSLCertificateFile /home/appstore/certs/mydomain.org.uk.crt
SSLCertificateKeyFile /home/appstore/certs/mydomain.org.uk.key
SSLCertificateChainFile /home/appstore/certs/gs_intermediate_ca.crt
</VirtualHost>
当我浏览第一个域名时,一切正常,但当我浏览第二个域名时,显示第一个域名。我做错了什么?
提前致谢。