提前感谢您的时间和回应。
我使用certbot生成了证书。
certbot -d *.mycompany.com --manual --preferred-challenges dns certonly
我在我的(Amazon Rt53)dns中创建了TXT记录,并创建了私钥和公钥。然后我将其转换为.pfx
openssl pkcs12 -inkey privkey.pem -in fullchain.pem -export -out mycompany.pfx
我在RD网关和多个服务器的其他地方使用生成的mycompany.pfx(因为我有一个* .mycompany.com)。
letencrypt显然会在90天后到期。所以我通过发出相同的命令续订证书
certbot -d *.mycompany.com --manual --preferred-challenges dns certonly
我拿到了新钥匙。我现在必须转到RD网关服务器并重新导入新的.pfx证书。我必须为我使用过证书的每台服务器执行此操作。
这是应该的方式吗?是否有一个我失踪的自动步骤
自动续订letsencrypt证书或certbot证书。
Certbot可以配置为在证书过期之前自动续订证书。
您可以设置cron作业以自动续订证书。
转到您的服务器并运行sudo crontab -e
。它将打开窗口添加以下命令。
0 0 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && /home/centos/certbot/certbot-auto renew >> /var/log/auto-renewal-cron 2>&1
您可以通过选择基于您的操作系统的系统和软件获得cron命令,如下面的截图:https://certbot.eff.org/lets-encrypt/osx-apache.html