我正在尝试使用 Cloudfront 和 Route 53 在已安装 Wordpress 的 EC2 实例上设置 SSL 证书,但是当我访问 URL 时,浏览器出现 502 错误。我没有使用 ELB,因为我预计流量不会很高(至少有一段时间)。有人知道问题出在哪里吗?
这是我遇到的错误:
Request URL:https://react.edbiden.com/
Request Method:GET
Status Code:502
Remote Address:54.230.11.194:443
Referrer Policy:no-referrer-when-downgrade
Response Headers
content-length:587
content-type:text/html
date:Sun, 13 Aug 2017 10:45:32 GMT
server:CloudFront
status:502
via:1.1 d10e0115903b50001036753d910516ef.cloudfront.net (CloudFront)
x-amz-cf-id:YWp5HN-1zbO56PxkmH_TIBYFtQ4sO1LnvmYk4wjnrTfuXKP0RHLxnQ==
x-cache:Error from cloudfront
在 Route 53 中,我有 IP4 和 IP6 的 A 记录:
Alias: Yes
Alias Target: d2dzwf20h9q46z.cloudfront.net.
Routing: Simple
如果有人能指出正确的方向,我将不胜感激。谢谢!
最佳答案
将源协议(protocol)策略更改为“仅 HTTP”。 否则,CloudFront 会尝试通过 HTTPS 连接到 EC2 实例,这可能会失败。
关于amazon-web-services - 尝试通过 Cloudfront 在 EC2 实例上设置 SSL 时出现 502 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45659647/