如何以编程方式使用certbot启用/禁用SSL

问题描述 投票:0回答:1

所以我正在使用nodejs和nginx,我想以编程方式使用certbot,并能够从exec()获得输出。

此命令应生成证书而无需用户交互:

certbot certonly --standalone --agree-tos -m [email protected] -d mydomain.com

但我得到了很多文本,我只需要证书的路径和到期日期。

有没有办法以nodejs友好格式获得它,比如json?

javascript node.js ssl nginx certbot
1个回答
1
投票

看着那个男人:https://certbot.eff.org/docs/man/certbot.html

使用标志-n Run non-interactively

您可以使用标志nginx为此自动安装。 --nginx Obtain and install certificates using Nginx (default: False)

最后:qazxsw poi

© www.soinside.com 2019 - 2024. All rights reserved.