NAT VPS没有443 80端口申请SSL证书

安装acme.sh

curl https://get.acme.sh | sh -s email=my@example.com

my@example.com替换成自己邮箱

DNS方式安装证书

手动 dns 方式, 手动在域名上添加一条 txt 解析记录, 验证域名所有权.

这种方式的好处是, 你不需要任何服务器, 不需要任何公网 ip, 只需要 dns 的解析记录即可完成验证. 坏处是,如果不同时配置 Automatic DNS API,使用这种方式 acme.sh 将无法自动更新证书,每次都需要手动再次重新解析验证域名所有权。

~/.acme.sh/acme.sh --issue -d a.com --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please

a.com换成自己域名

之后会有如下输出:

Add the following TXT record:
[Tue 10 Jan 2023 09:45:27 PM EST] Domain: '_acme-challenge.a.com'
[Tue 10 Jan 2023 09:45:27 PM EST] TXT value: '_5O--gNfxYXoFFgulwmI0oqqqH98xTznPN8SKgUIVMk'
[Tue 10 Jan 2023 09:45:27 PM EST] Please be aware that you prepend _acme-challenge. before your domain
[Tue 10 Jan 2023 09:45:27 PM EST] so the resulting subdomain will be: _acme-challenge.bbnn.xswl.lol
[Tue 10 Jan 2023 09:45:27 PM EST] Please add the TXT records to the domains, and re-run with --renew.
[Tue 10 Jan 2023 09:45:27 PM EST] Please add '--debug' or '--log' to check more details.
[Tue 10 Jan 2023 09:45:27 PM EST] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

在你的域名解析出添加一条TXT解析

Domain后的内容放在name里

TXT value后的内容放Content里

NAT VPS没有443 80端口申请SSL证书

等几分钟解析,然后服务器输入下面命令

~/.acme.sh/acme.sh --renew -d a.com --yes-I-know-dns-manual-mode-enough-go-ahead-please

a.com换成自己域名

NAT VPS没有443 80端口申请SSL证书
出现这个说明证书下发

最后把证书文件保存到/root/文件夹内

~/.acme.sh/acme.sh --installcert -d a.com --key-file /root/private.key --fullchain-file /root/cert.cr

a.com换成自己域名

文章版权归作者所有。发布者:白嫖怪,转转请注明出处:https://c7pai.com/1123/

(0)
白嫖怪白嫖怪
上一篇 2022年12月30日 下午3:40
下一篇 2023年1月13日 下午8:36

相关推荐

发表回复

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