1, 检查是否安装扩展

如果没有就yum安装

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

  yum install mod_ssl openssl

  rpm -qa| grep mod_ssl

Centos7.2配置https 随笔 第1张

  rpm -qa| grep openssl

Centos7.2配置https 随笔 第2张

安装完成后会生成一个

  /etc/httpd/conf.d/ssl.conf文件

然后把申请的证书上传上去自定义一个目录

创建一个存放证书的目录

  mkdir /etc/httpd/conf/ssl/

Centos7.2配置https 随笔 第3张

上传证书

Centos7.2配置https 随笔 第4张

开始配置ssl.conf文件,对源文件做备份

Centos7.2配置https 随笔 第5张

开启你网站的目录

Centos7.2配置https 随笔 第6张

将servername设置为你的域名

Centos7.2配置https 随笔 第7张

注释掉原有的

SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM

Centos7.2配置https 随笔 第8张

开启ssl,设置为SSLHonorCipherOrder on

Centos7.2配置https 随笔 第9张

配置你证书路径

Centos7.2配置https 随笔 第10张

Centos7.2配置https 随笔 第11张

Centos7.2配置https 随笔 第12张

重启apache就好了!

如果访问时候没有权限就需要配置httpd.conf

Centos7.2配置https 随笔 第13张

连接地址:https://blog.csdn.net/th_csdn/article/details/80706921

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄