Cloudfront错误:502错误无法满足请求

问题描述

我有一个aws lightail实例。我已经创建了一个发行版,并选择实例作为我的来源。但是,当我访问分发给我的默认域:xxxxxxxxxx.cloudfront.net时,出现了以下消息:

502 ERROR
The request could not be satisfied.
CloudFront wasn't able to connect to the origin. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later,or contact the app or website owner.
If you provide content to customers through CloudFront,you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)

但是当我使用我的域名进行访问时,它工作正常,除了我收到x-cache: Miss from cloudfront的某些请求之外

在我的发行版中,我设置了您的发行版仅使用HTTPS从您的来源中提取内容

在WordPress的配置中,我已经安装了SSL证书并像这样配置https:

define('WP_SITEURL','https://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME','https://' . $_SERVER['HTTP_HOST'] . '/');

我不知道我的网站是否有问题,您能帮我吗?

解决方法

我只是不知道发行版证书内置的 AWS Lightsail 有什么问题。 因此,我去服务 AWS Cloudfront ,并创建一个带有证书的发行版,并将我的Lightsail的DNS配置为该发行版。而且一切正常。 请参阅:https://aws.amazon.com/blogs/compute/deploying-a-highly-available-wordpress-site-on-amazon-lightsail-part-1-implementing-a-highly-available-lightsail-database-with-wordpress/

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...