Apache环境下配置多个站点的SSL证书
Posted peteremperor
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apache环境下配置多个站点的SSL证书相关的知识,希望对你有一定的参考价值。
重新创建apache目录中conf/extra/下的httpd-ssl.conf文件
Listen 443
<VirtualHost *.443>
DocumentRoot "/var/www/site1"
ServerName www.site1.com
ServerAlias www.site1.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/home/site1/fullchain.pem"
SSLCertificateKeyFile "/home/site1/privkey.pem"
SSLCACertificateFile "/home/site1/chain.pem"
</VirtualHost>
<VirtualHost *.443>
DocumentRoot "/var/www/site2"
ServerName www.site2.com
ServerAlias www.site2.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/home/site2/fullchain.pem"
SSLCertificateKeyFile "/home/site2/privkey.pem"
SSLCACertificateFile "/home/site2/chain.pem"
</VirtualHost>
ssl配置文件只能有一个,如果两个文件都listen443会出错
以上是关于Apache环境下配置多个站点的SSL证书的主要内容,如果未能解决你的问题,请参考以下文章