
因每次 renew 的候,都要一下 web 服,上用 cron 方式 renew 的太繁了,了少掉和次,所以自己了一本。
一很的本,代:
https://blog.d-l.io/auto-renew-letsencrypt
的候通 screen 命令自行本,需要查看的候用 screen -r 命令:

我一直很喜用 screen 工具把普通本作 daemon 程序,看行比方便,方便查和,可省掉一些的 log 到文件的制。
1 totoro625 2022-03-16 10:18:33 +08:00 为啥需要关闭一下 web 服务? 我用的 ``` $ACME --issue \ --dns dns_dp \ --server zerossl \ --challenge-alias acme.example.com \ --keylength ec-256 \ -d example.com \ -d example2.com \ -d *.example.com \ -d *.example2.com ``` 每月 1 号运行一次 GitHub Actions ,推送证书到 COS 需要的服务器 wget 回来 |
2 konakona 2022-03-16 10:37:15 +08:00 不用关闭 web 服务,申请证书成功后 web 服务 reload 下配置就好了。每次获取的证书难道不都是同名同姓的吗? |
3 mritd 2022-03-16 10:53:59 +08:00 via iPhone 跑个题,要不要试试 Caddy |
4 duke807 OP |
6 konakona 2022-03-16 13:35:22 +08:00 @duke807 https://certbot.eff.org/instructions?ws=apache&os=ubuntubionic 为什么会出现需要关闭 web 服务的现象?总感觉是用法不对。 我 apache 、nginx ,用过 certbot 、lego 、traefik-acme ,都木有遇到过你这个情况耶。 |
7 konakona 2022-03-16 13:40:47 +08:00 或者你在 apache 里将 http challenge 的请求(一个路径 /.well-known/acme-challenge )做一个转发,也可以保障 web 服务不中断的情况下完成证书签发。 https://letsencrypt.org/zh-cn/docs/allow-port-80/ https://eff-certbot.readthedocs.io/en/stable/api/certbot.plugins.common.html?highlight=port#certbot.plugins.common.Addr.get_port |
8 totoro625 2022-03-16 15:17:00 +08:00 申请证书一般有两种方式验证: http 和 dns 验证 http 方式需要服务器开启一个端口,验证 dns 的 ip 指向 dns 方式, 在域名上添加一条 txt 解析记录, 验证域名所有权 参考 acme.sh 的说明 https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E 直接通过一个服务器申请全部证书最后分发到各个服务器即可 我这边都是内网服务器,所以直接通过 GitHub Actions 生成了 搜索排名第一的是这个教程: https://www.ioiox.com/archives/104.html |