安装https服务

1.yum install httpd    -y

2.yum install mode_ssl   -y

3.下载秘钥(本次实验所用秘钥为www0.crt   www0.key   example-ca.crt)下载到 /var/www/html

4.修改配置文件

vim  /etc/httpd/conf.d/web.conf     (该配置文件之前并不存在,是自己创建的)

    保存退出

5.这次重启httpd服务会报错,解决办法如下:

  setsebool  -P  httpd_read_user_content=on

6.在防火墙放行https服务

   firewall-cmd  --permant  --add-service=http

   firewall-cmd  --permant  --add-service=https

   firewall-cmd  --reload

7.systemctl restart  httpd

8.在客户端输入 https:server0.example.com 去访问即可。(server0.example.com是本次实验的主机名,仅供参考)

原文地址:https://www.cnblogs.com/cloud-yongqing/p/11806978.html