• Nginx HTTPS 部署实战


    具体参见nginx的md文档
    1、申请阿里云免费证
    2、然后上传到nginx [root@nginx ~]# cd /etc/nginx/ && mkdir cert
    3、[root@nginx ~]# unzip 2447549_www.testpm.cn_nginx.zip
    4、[root@nginx ~]# ls
    2447549_www.testpm.cn.key 2447549_www.testpm.cn_nginx.zip 2447549_www.testpm.cn.pem
    [root@nginx ~]# cp 2447549_www.testpm.cn* /etc/nginx/cert/
    5、证书配置
    [root@nginx ~]# cd /etc/nginx/conf.d/
    [root@nginx conf.d]# mv default.conf nginx_ssl.conf
    [root@nginx conf.d]# vim nginx_ssl.conf
    [root@nginx conf.d]# cat /etc/nginx/conf.d/nginx_ssl.conf
    server {
    listen 443 ssl;
    server_name www.testpm.cn;
    access_log /var/log/nginx/https_access.log main;
     
    #ssl on;
    ssl_certificate /etc/nginx/cert/2447549_www.testpm.cn.pem;
    ssl_certificate_key /etc/nginx/cert/2447549_www.testpm.cn.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    ssl_prefer_server_ciphers on;
     
    location / {
    root /usr/share/nginx/html;
    index index.html index.htm;
    }
    }

  • 相关阅读:
    SpringBoot 拦截器
    SpringBoot学习笔记1
    mysql学习1
    mybatis运行原理学习
    js学习2
    设计原则
    mybatis学习1
    spring mvc
    Jenkins流水线部署maven不同模块服务到不同服务器运行
    L2Dwidget让自己的vue项目骚起来
  • 原文地址:https://www.cnblogs.com/xiaoai666/p/13823352.html
Copyright © 2020-2023  润新知