Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新证书同时同步到其他服务器的办法 #91

Open
Kaiyuan opened this issue Jun 12, 2022 · 2 comments
Open

更新证书同时同步到其他服务器的办法 #91

Kaiyuan opened this issue Jun 12, 2022 · 2 comments

Comments

@Kaiyuan
Copy link

Kaiyuan commented Jun 12, 2022

两台 VPS 还有软理由,群晖每两个月更新一次证书,然后在 57行后面加上 &&,然后加上rsync 代码就可以了。
前提是 root 配置好 ssh 证书,然后在群晖终端用 root 连过服务器之后。然后域名 key 先传到服务器先,因为不会变的,然后每次更新只要同步 fullchain.cer。至于服务器,可以检测到 fullchain.cer 有变化就自动重启 nginx。我的 OpenWRT 因为每周重启一次,所以就不用配置。

${ACME_BIN_PATH}/acme.sh --force --installcert -d ${DOMAIN} -d *.${DOMAIN} \
    --certpath ${CRT_PATH}/cert.pem \
    --key-file ${CRT_PATH}/privkey.pem \
    --fullchain-file ${CRT_PATH}/fullchain.pem &&
rsync -avz /volume1/disk1/sh/syno-acme/acme.sh/abc.com/fullchain.cer root@openwrt:/etc/acme/ssl
@leverule
Copy link

刚试给两个异地群晖都申请相同的泛域名证书,发现也可以,后申请的对先申请的也没影响,这样也可以吧?

不会单独用脚本里更新证书那部分……😂

@CoOlaRlL
Copy link

CoOlaRlL commented Oct 31, 2022

两台 VPS 还有软理由,群晖每两个月更新一次证书,然后在 57行后面加上 &&,然后加上rsync 代码就可以了。 前提是 root 配置好 ssh 证书,然后在群晖终端用 root 连过服务器之后。然后域名 key 先传到服务器先,因为不会变的,然后每次更新只要同步 fullchain.cer。至于服务器,可以检测到 fullchain.cer 有变化就自动重启 nginx。我的 OpenWRT 因为每周重启一次,所以就不用配置。

${ACME_BIN_PATH}/acme.sh --force --installcert -d ${DOMAIN} -d *.${DOMAIN} \
    --certpath ${CRT_PATH}/cert.pem \
    --key-file ${CRT_PATH}/privkey.pem \
    --fullchain-file ${CRT_PATH}/fullchain.pem &&
rsync -avz /volume1/disk1/sh/syno-acme/acme.sh/abc.com/fullchain.cer root@openwrt:/etc/acme/ssl

给软路由esxi传送fullchain.cer怎么转换格式和名称?
rsync -avz /volume1/disk1/sh/syno-acme/acme.sh/abc.com/fullchain.cer root@ESXI:/etc/VMware/ssl/rui.crt
这个格式可行吗?ESXI证书安装部署一点也不能错,搞不好就进不来后台了,诚心求教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants