1.新建服务器证书
如下命令可以生成证书
生成rsa服务器证书
openssl genrsa -out ca-key.pem 1024
openssl req -new -key ca-key.pem -out ca-req.csr -subj "/C=CN/ST=BJ/L=BJ/O=BJ/OU=BJ/CN=BJ"
openssl x509 -req -in ca-req.csr -out ca-cert.pem -signkey ca-key.pem -days 3650
2.创建负载均衡,使用该证书创建监听器
3.创建虚拟机作为后端主机,在虚拟机内起nginx服务
[root@Compute_1 rsaca]# cat /etc/nginx/nginx.conf
user root root;
error_log /var/log/nginx/nginx-fan-vm1.log debug;
pid /var/log/nginx/nginx-fan-vm1.pid;
worker_rlimit_nofile 4096;
events {
use epoll;
worker_connections 4096;
}
http{
server {
listen 8000;
listen [::]:8000;
server_name localhost;
access_log off;
location / {
root /root/;
index who.html;
}
}
}
4.通过LB的内网地址访问https监听器服务
5.查看server回包中的Cipher Suite确认选择的加密算法,如图算法为EC算法