重新创建apache目录中conf/extra/下的httpd-ssl.conf文件
NameVirtualHost *:443 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> <VirtualHost *:443> DocumentRoot "/var/www/site3" ServerName www.site3.com ServerAlias www.site3.com SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLCertificateFile "/home/site3/fullchain.pem" SSLCertificateKeyFile "/home/site3/privkey.pem" SSLCACertificateFile "/home/site3/chain.pem" </VirtualHost>
ssl配置文件只能有一个,如果两个文件都listen443会出错