我有一台服务器作为 EC2 实例在 Amazon Web Services 上运行,并且希望以安全方式 (https) 访问它。我决定使用Let's Encrypt ,关注this将 SSL 证书安装到服务器的教程(使用 --webroot
插件类型)。我使用 PuTTY 来访问 EC2 实例。在最后一步中,系统提示我提供域名,其中我键入了 AWS 为实例生成的 URL(不是我自己的/屏蔽的域名)。
我收到未经授权的错误,并附有注释
FailedChallenges Failed authorization procedure abcd.efgh.us-west-2.elasticbeanstalk.com (http-01) :urn:acme:error:unautorized :: The client lacks sufficient authorization :: Invalid response from http://abcd.efgh.us-west-2.elasticbeanstalk.com/.well-known/acme-challenge/...
注意:abcd.efgh.us-west-2.elasticbeanstalk.com 只是我为该问题提供的 AWS 域名的示例。
我还收到错误后的注释:
To fix these errors, please make sure that your domain name was entered correctly and the DNS A record(s) for that domain contain(s) the right IP address.
我不确定是否会发生这种情况,因为我直接使用 AWS 域名,而不是我拥有的域名。
那么,如果我使用我拥有的域名,或者这个问题是因为我需要添加/更改其他内容,我会摆脱这个错误吗?请指教。
最佳答案
问题是您尝试使用 Amazon EC2 实例的 URL 运行 Let's Encrypt。您需要注册一个域,将其指向该 EC2 实例,然后使用该域名运行 Let's Encrypt。
关于ssl - 使用 Let's Encrypt 将 SSL 证书添加到 AWS EC2 实例时出现 "Unauthorized"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37675669/