Centos6.5 Apache进阶搭建SSL

继上次已经成功搭建了Apache,接下来搭建ssl服务

1.安装openssl

// 安装mod_ssl
yum -y install mod*

在这里插入图片描述

2.生成密钥和证书

cd /etc/httpd/conf.d/
openssl genrsa -des3 -out https.key 2048
openssl req -text -new -key https.key -x509 -days 3650

openssl genrsa -des3 -out https.key 2048

3.修改SSL配置文件

ServerName 本地IP:443
SSLCertificateFile 证书位置
SSLCertificateKeyFile 私钥位置

在这里插入图片描述
验证:
在这里插入图片描述

在这里插入图片描述

ok,gays!

猜你喜欢

转载自blog.csdn.net/Nocker888/article/details/107005399