zoukankan      html  css  js  c++  java
  • centos7 nigx 免费永久获取 Let‘s Encrypt 证书

    Let‘s Encrypt 获取Https证书 假设安装目录:/root/letsencrypt(在线方式申请:https://easy.zhetao.com/
    1.cd root目录安装git yum -y install git
    2.输入 git clone https://github.com/letsencrypt/letsencrypt
    3.cd letsencrypt
    4.chmod +x letsencrypt-auto
    5.安装证书
    ./letsencrypt-auto certonly --email 1649747584@qq.com -d networkstar.wang
    6.自动续签:
    a:执行 crontab -e
    b:添加下面的配置
    00 00 * * * /root/letsencrypt/certbot-auto renew --force-renewal --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" >> /root/letsencrypt/letsencry.log 2>&1

    7.ngix配置证书


    listen 443 ssl; ssl on; ssl_certificate /root/letsencrypt/live/XXX.com/fullchain.pem; ssl_certificate_key /root/letsencrypt/live/XXX.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  • 相关阅读:
    Java-判断一个数是不是素数
    Sublime快捷键
    python
    全排列
    python
    python
    OpenCV 实现图像结构相似度算法 (SSIM 算法)
    C++
    C++
    NFA 转 DFA
  • 原文地址:https://www.cnblogs.com/peachwts/p/12172932.html
Copyright © 2011-2022 走看看