阿里云上CentOS7的Apache启动https
1:到阿里云控制台上申请证书
控制台-CA证书服务-购买证书
2:安装openssl
yum install mod_ssl openssl
3:新建文件夹,存放证书key
mkdir -p /etc/httpd/ssl
并且将阿里云的证书文件上传到此目录
4:修改/etc/httpd/conf.d/ssl.conf
在<VirtualHost _default_:443>后面添加内容
DocumentRoot "/var/www/html/https"
ServerName www.lijiahong.com:443
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile /etc/httpd/ssl/2492434_lijiahong.cn_public.crt
# 证书私钥配置
SSLCertificateKeyFile/etc/httpd/ssl/2492434_lijiahong.cn.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile /etc/httpd/ssl//chain.pem
5:重启apache
systemctl restart httpd.service
6:访问https://www.lijiahong.com:443
控制台-CA证书服务-购买证书
2:安装openssl
yum install mod_ssl openssl
3:新建文件夹,存放证书key
mkdir -p /etc/httpd/ssl
并且将阿里云的证书文件上传到此目录
4:修改/etc/httpd/conf.d/ssl.conf
在<VirtualHost _default_:443>后面添加内容
DocumentRoot "/var/www/html/https"
ServerName www.lijiahong.com:443
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile /etc/httpd/ssl/2492434_lijiahong.cn_public.crt
# 证书私钥配置
SSLCertificateKeyFile/etc/httpd/ssl/2492434_lijiahong.cn.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile /etc/httpd/ssl//chain.pem
5:重启apache
systemctl restart httpd.service
6:访问https://www.lijiahong.com:443