首页 > 其他 > 详细

用 letsencrypt 生成 SSL 证书

时间:2018-03-28 16:34:08      阅读:165      评论:0      收藏:0      [点我收藏+]

letsencrypt 生成 SSL 证书

  • 事先配置好访问域名(也可以在本地 hosts 配置)
  • 在nginx 对应虚拟主机添加一个验证区域:


配置 nginx

server {
    ...
    location ~ /.well-known {
        allow all;
    }
    ...
}


生成 SSL

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto certonly
  • 选择使用: webroot 进行验证


一劳永逸

letsencrypt 证书有效期为3个月, 其生成证书路径在: /etc/letsencrypt/live/<domain>/ 下, 证书名称为 fullchain.pem, 私钥为 privatekey.pem

可以做一个软连接:

ln -sv /usr/local/openresty/nginx/conf/ssl -> /etc/letsencrypt/live/<domain>/

用 letsencrypt 生成 SSL 证书

原文:https://www.cnblogs.com/tiantiandas/p/letsencrypt_generate_ssl_certificate.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!