linux - 如何仅为子域创建 Let's Encrypt 自签名证书? (帖子错误)

标签 linux subdomain lets-encrypt self-signed

如何为子域创建 Let's Encrypt 自签名证书?

具体来说:

  • sub.domain.com(需要证书并指向一个 ip 地址)
  • domain.com(不指向任何内容)

关注 the following instructions 时,我收到以下错误:

>>> sudo -H ./letsencrypt-auto certonly --standalone -d sub.domain.com --register-unsafely-without-email
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for sub.domain.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. sub.domain.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: sub.domain.com
   Type:   connection
   Detail: Timeout

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.

最佳答案

您可以为子域创建 Let's Encrypt 证书,而无需将 domian 指向任何根。

  • 登录到 DNS 管理并为 subdomian 创建一个 NAME 记录。对于 A NAME,您需要 IP 地址
    • 验证 sub.domian.com 可通过互联网访问。
    • 为 sub.domian.com 运行脚本。

https://zerossl.com/free-ssl/#crt也可用于生成证书和 key ,但是需要一些手动步骤来创建 .well-known 和 aceme-challenge 文件夹需要在 sub.domian.com/DocumentRoot 中创建

关于linux - 如何仅为子域创建 Let's Encrypt 自签名证书? (帖子错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46175664/

相关文章:

c++ - 套接字,Unix 域 UDP C++ recvfrom 无法填充源地址

redirect - 子域使用 SRV 重定向到特定端口?

asp.net - 如何在 IIS 7 上设置子域

ssl - Let's Encrypt 是否需要 HTTPS 来更新证书?

ssl - 在没有 “www”的情况下访问时将证书添加到我的站点

ubuntu - 无法使用 Let's Encrypt 在我的网站上安装 SSL

linux - SMP 中的 CPU 停顿

ruby - 在 Linux 上的 rclone 安装卷中启动 ruby​​ irb 时出错

github - 如何在 Github Pages 上设置子域

c++ - 如何用gcc创建和使用自定义共享库?