免费SSL证书Let's encrypt申请流程及nginxSSL配置

自渡
2017-11-22 / 1 评论 / 1,325 阅读

wget https://dl.eff.org/certbot-auto

chmod a+x certbot-auto

单域名

./certbot-auto certonly --email youremail@example.com --agree-tos --webroot -w 网站目录 -d 域名

多域名

./certbot-auto certonly --email youremail@example.com --agree-tos --webroot -w 网站目录 -d 域名1 -d 域名2

续期

./certbot-auto certonly --renew-by-default --email youremail@example.com -d yourdomainname

nginxSSL段配置写法

ssl on;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers
"EECDH+CHACHA20:EECDH+CHACHA20-
draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;

0

评论 (1)

取消
  1. 头像
    Edgeone
    MacOS · Google Chrome
    @

    建议作者在文章结尾加一个证书配置是否符合预期的检测工具,例如:https://edgeone.ai/tools/ssl-certificate,符合读者自己操作后能快速多处验证的诉求。
    感谢博主分享的原创内容,期待输出更多内容。

    回复