Certbot 无法验证某些域

Bea*_*God 7 amazon-ec2 node.js certbot ubuntu-20.04

这是我第一次构建服务器并将其托管到 AWS EC2。运行命令时 sudo certbot certonly --standalonesudo certbot certonly --webroot我收到以下错误

Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
  Domain: matthieuxroger.com
  Type:   unauthorized
  Detail: Invalid response from http://matthieuxroger.com/.well-known/acme-challenge/nWRAFCcRUeVxZ0C5YtRg_9bihG2YQeqacUcGjxdCMzg [18.205.22.32]: "<!DOCTYPE html>\n<html>\n  <head>\n    <title>Matthieux Roger</title>\n    <link rel='stylesheet' href='/stylesheets/style.css' />\n "
Run Code Online (Sandbox Code Playgroud)

我在 AWS EC2 上运行的 ubuntu 20 上使用 nodejs。任何帮助将不胜感激。

loo*_*ops 9

当与 Certbot 一起使用该webroot方法时,会启动一个提供单个文件的 Web 服务器,以便 Let's Encrypt 可以验证域中服务器的所有权。但是当 LE 访问您的域时,它会使用另一台服务器来提供 404 页面。您的域的 DNS 似乎没有指向正在请求证书的 EC2 实例。(或者也许它已经更新但尚未传播)。您需要更新 DNS 记录以指向使用 certbot 请求证书的服务器。或者,您可以使用不需要运行服务器来证明所有权的不同质询类型(例如dns-01)。