锦方的个人网页

Nginx on CentOS7续ssl证书

发布 · 约 24 字 · 预计 1 分钟

CentOS 7 上用 Certbot 为 Nginx 续签 SSL 证书时的报错与处理记录。

归档记录:本文最后更新于 2017 年,文中涉及的软件版本、配置或命令可能已随环境演进发生变化。

证书官网地址: https://certbot.eff.org/#centosrhel7-nginx

用官网的说明方法会报错所以

    pip install certbot-nginx
    certbot certificates//这句忘记干嘛的了
    wget https://dl.eff.org/certbot-auto
    chmod a+x certbot-auto
    //需要先停止nginx服务
    service nginx stop
    //获取证书
   ./certbot-auto certonly --standalone --email [email protected] -d example.com -d www.example.com
    //以后自动获取ssl证书
   ./certbot-auto renew --standalone --email [email protected] -d example.com -d www.example.com
    service nginx start

✉ 对本文有补充或勘误?欢迎就本文写信交流。