zoukankan      html  css  js  c++  java
  • 使用 lego生成 Let's Encrypt 证书

    1. 工具


     
    2. 使用
    命令生成新的
    lego --email="foo@bar.com" --domains="example.com" run
    请求重新生成
    lego --email="foo@bar.com" --domains="example.com" renew
    按照时间生成证书
    lego --email="foo@bar.com" --domains="example.com" renew --days 30
    3. 参考例子
    lego --email="foo@bar.com" --domains="yunmarket.info" run
    数据文件(隐藏文件夹 当前目录  .lego)
     4. nginx 配置

    server {
            listen       443 ssl http2;
            server_name  localhost;
            root         /usr/share/nginx/html;
            ssl_certificate      /opt/mycert/yunmarket.info.crt;
            ssl_certificate_key  /opt/mycert/yunmarket.info.key;
    
            ssl_session_cache    shared:SSL:1m;
            ssl_session_timeout  5m;
            ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:AES256+EDH';
            #ssl_ciphers  HIGH:!aNULL:!MD5;
            ssl_prefer_server_ciphers  on;
            location / {
             index index.html index.htm;
           }
      }
     
     
    5. 访问效果
     
     
    6. 问题
     
     30天过期时间,可以添加任务调度进行更新获取,还有一个问题是默认工具使用的
    是http 80 端口,一个可选的配置是http :port 
  • 相关阅读:
    mongodb的安装
    express初体验
    vscode自定义快捷键
    项目开发前准备——清除默认样式
    手动开启和关闭mysql
    一步添加博客园看板娘
    js实现动态球球背景
    kendo grid 使用小结
    flask 与celery
    scrapy 调用js
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/7265186.html
Copyright © 2011-2022 走看看