美文网首页
用 Certbot-auto 在 letsencrypt.org

用 Certbot-auto 在 letsencrypt.org

作者: Asir王智圣 | 来源:发表于2018-06-12 22:14 被阅读431次

一、申请条件:

1.Linux服务器或VM一台
2.安装了Nginx Web Server
3.域名CAA DNS解析

二、域名CAA DNS解析

国内推荐https://www.cloudxns.net/

解析记录

三、下载Certbot-auto

wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

四、申请ssl证书

./certbot-auto certonly --email xxx@sina.com --agree-tos --no-eff-email --webroot -w /data/wwwroot/gitlab -d xxx.xxx.cn

五、Nginx配置ssl证书

  listen 443;
  ssl on;
  ssl_certificate /etc/letsencrypt/live/gitlab.vizn.cn/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/gitlab.vizn.cn/privkey.pem;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;
  ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

六、ssl有效期3个月,续约命令

./certbot-auto renew

相关文章

网友评论

      本文标题:用 Certbot-auto 在 letsencrypt.org

      本文链接:https://www.haomeiwen.com/subject/gttdeftx.html