申请站点https证书(windows平台)

由于Let’s Encrypt是开源证书颁发机构,所以今天我们就来薅他们家的羊毛。

1.下载certbot,https://dl.eff.org/certbot-beta-installer-win32.exe

2.执行申请命令:

certbot -v certonly --manual --preferred-challenge dns -d cycx.top
Please deploy a DNS TXT record under the name:

_acme-challenge.ene.dynu.net.

with the following value:

ZznXD4RC0oSjN1KTLtpJ0PFbOJB9RjDCXPHytUM71Mo

Before continuing, verify the TXT record has been deployed. Depending on the DNS
provider, this may take some time, from a few seconds to multiple minutes. You can
check if it has finished deploying with aid of online tools, such as the Google
Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.ene.dynu.net.
Look for one or more bolded line(s) below the line ';ANSWER'. It should show the
value(s) you've just added.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

之后来到你的dns后台,我用的是dynu提供的服务,后台如下:

蓝色文字填在“子域名”文本框中,请注意:

_acme-challenge.ene.dynu.net 只需要填写 _acme-challenge 即可,红色文字填在“文本”文本框中,类型选择TXT,然后点击“添加dns记录”按钮,返回按回车即可得到证书。

注: ene.dynu.net 换成你自己的域名,然后按照提示去你自己的dns后台设置dns记录为txt,然后输入文本的位置会自动显示出来。

成功之后会显示已保存的证书文件,按照需要安装到站点对应的目录即可。

PS:如果想在同一个证书中既包含主域名又同时包含泛域名,请在命令中增加一项即可

certbot -v certonly --manual --preferred-challenge dns -d cycx.top -d *.cycx.top

作者:刹那

命中有时终须有,命中无时需强求。

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注