码迷,mamicode.com
首页 > Web开发 > 详细

Apache环境下配置多个站点的SSL证书

时间:2019-04-03 16:44:04      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:lis   nbsp   apache目录   文件   一个   host   virt   lca   ica   

重新创建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证书

标签:lis   nbsp   apache目录   文件   一个   host   virt   lca   ica   

原文地址:https://www.cnblogs.com/peteremperor/p/10649664.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!