为了实现证书部署的自动化部署,FreeCert平台平台提供了配套的部署工具,该程序部署在服务之后,启动时会执行一次部署任务,然后在每天的凌晨3点会定时执行部署任务, 当证书快过期时,FreeCert平台签发新的证书之后,该服务在检测到有新证书时会重新部署,免去了证书过期之后人工维护的工作。下面是自动部署工具下载地址:
该程序主要包括两个配置文件,其中appsettings.json用于配置账户信息
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Account": {
"Name": "",
"PassWord": ""
}
}
在Account节点输入在FreeCert平台注册的账户信息即可,Name默认为手机号,密码为注册时设定的密码.
certificates.json用于配置证书部署信息
[
{
"Domain": "*.aaa.net",
"Path": "c:/freecert/ssl/",
"Format": "pfx",
"ReloadCommand": null
},
{
"Domain": "*.xxx.com",
"Path": "/usr/local/nginx/conf/ssl/",
"Format": "pem",
"ReloadCommand": "/etc/init.d/nginx reload"
}
]
该配置文件的内容是一个JSON数组,支持配置多个证书,对象字段说明如下: