Apache安装SSL证书

从让我们加密下载已经颁发的证书,里面应该包含:

cer.cer

key.key 

ca.cer

<VirtualHost *:443>
DocumentRoot /home/wwwroot/www.domain.com
ServerName www.domain.com:443
ServerAlias domain.com
SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl/www.domain.com/cer.cer
SSLCertificateKeyFile /usr/local/apache/conf/ssl/www.domain.com/key.key
SSLCertificateChainFile /usr/local/apache/conf/ssl/www.domain.com/ca.cer
Protocols h2 h2c http/1.1
<Directory "/home/wwwroot/www.domain.com">
    SetOutputFilter DEFLATE
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.php
</Directory>
</VirtualHost>

以上配置仅供参考,其他参数请根据生产环境需要添加。