配置阿里云SLB全站HTTPS集群

配置阿里云SLB全站HTTPS集群(以下内容仅为流程,信息可能有些对应不上)

1 登录阿里云购买两台实例

1.1 按量付费购买两台实例

1.2 配置网络可以不选择分配外网

1.3 自定义密码

1.4 购买完成

1.5 实例列表

2 购买SLB实例

2.1 按量付费购买SLB实例

2.2 SLB实例列表

3. 配置负载均衡实例端口转发

3.1 配置SLB服务器5555端口转发到服务器的22端口(另一台同样配置6666端口转发)






3.2 配置SLB服务器80端口负载均衡到两台服务器的80端口



4. 配置服务器

4.1 利用端口转发连接没有外网的服务器实例(两台机器)

4.2 修改主机名并安装nginx(两台机器)

[root@iZuf6ghkj6xlvmskd7k9e7Z ~]# hostnamectl set-hostname test01
[root@iZuf6ghkj6xlvmskd7k9e7Z ~]# bash
[root@test01 ~]# yum install -y nginx

4.3 配置并启动nginx(两台机器)

[root@test01 ~]# vim /etc/nginx/nginx.conf
server {
    listen       80;
    server_name  test.mumusir.com;
    root         /usr/share/nginx/html;
}
[root@test01 ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@test01 ~]# nginx

4.4 配置一个页面

[root@test01 ~]# echo '1111111111111' > /usr/share/nginx/html/index.html
[root@test02 ~]# echo 222222222222 > /usr/share/nginx/html/index.html

4.5 浏览器测试

-c

5.购买并配置证书

5.1 购买免费型DV证书

5.2 证书申请绑定、验证、审核



验证后会在域名解析页面自动生成一个TXT记录,非阿里云域名需要配置

配置一个域名解析

6. 部署证书

6.1 SLB配置证书访问

6.2 删除原80跳转80

6.3 添加443端口转发80

6.4 配置网页http跳转https

6.5 所有端口配置完成后

6.6浏览器再次测试

猜你喜欢

转载自www.cnblogs.com/gongjingyun123--/p/11436426.html