簡體   English   中英

如何以編程方式使用certbot啟用/禁用SSL

[英]How to programmatically use certbot to enable/disable SSL

因此,我正在使用nodejs和nginx,並且希望以編程方式與之一起使用certbot並能夠從exec()獲取輸出。

此命令應在沒有用戶交互的情況下生成證書:

certbot certonly --standalone --agree-tos -m my@email.com -d mydomain.com

但是我收到了很多文本,我只需要證書的路徑和到期日期。

有沒有辦法以像json這樣的nodejs友好格式來獲取它?

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

使用標志-n Run non-interactively

您可以使用標志nginx來自動執行安裝。 --nginx Obtain and install certificates using Nginx (default: False)

certbot --agree-tos -n --nginx -d example.com -d www.example.com -m hello@mail.comcertbot --agree-tos -n --nginx -d example.com -d www.example.com -m hello@mail.com

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM