如何使用 route 53、cloudfront distribution 和 elastic beanstalk 修复 504 ERROR
How to fix 504 ERROR with route 53, cloudfront distribution and elastic beanstalk
我无法让我的 nodejs api 使用 elastic beanstalk、cloudfront distribution 和 route 53 工作。我需要我的 api 运行 在 SSL 后面,这这就是我使用云端分发的原因。我有以下设置。
当我访问我的 api https://api.mydomain.com
时,我收到 504 错误消息。
实际 url 我的 api 在 运行 上(成功地使用 nodejs elastic with beantalk)是 http://dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
。我只想将 url 与 SSL 一起屏蔽为 api.mydomain.com
。
我有什么地方做错了吗/你能建议我尝试什么吗?
查看 cloudfront 的配置,这看起来很奇怪,图片显示了以 S3 为前缀的设置,但是这个 api 不在 S3 上(至少不在 S3 上),它由 elastic beanstalk 托管。
谢谢,
错误信息
504 ERROR
The request could not be satisfied.
CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.
If you received this error while trying to use an app or access a website, please contact the provider or website owner for assistance.
53 号公路
- 姓名=api.mydomain.com
- 类型=(A)别名目标=wqsdn31817
CloudFront 分布
域名=wqsdn31817
origin = dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com(如果我访问这个 url 我会看到我的 api 运行)
SSL证书=api.mydomain.com
状态=已部署
源站设置/源站域名=http://dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
源设置/源协议策略 = 仅 HTTPS
橡皮豆
Nodejs api(使用 express)
在beanstalk环境ID:e-1nasn4,URL:dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
CloudFront 仅在无法建立 TCP 连接或 HTTP 第一个字节响应花费的时间超过 Origin read/response 超时中配置的时间时才提供 504。
您的应用程序是否直接与 beantalk 一起工作link或者您是否有任何基于 IP 的安全组限制?
我无法让我的 nodejs api 使用 elastic beanstalk、cloudfront distribution 和 route 53 工作。我需要我的 api 运行 在 SSL 后面,这这就是我使用云端分发的原因。我有以下设置。
当我访问我的 api https://api.mydomain.com
时,我收到 504 错误消息。
实际 url 我的 api 在 运行 上(成功地使用 nodejs elastic with beantalk)是 http://dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
。我只想将 url 与 SSL 一起屏蔽为 api.mydomain.com
。
我有什么地方做错了吗/你能建议我尝试什么吗?
查看 cloudfront 的配置,这看起来很奇怪,图片显示了以 S3 为前缀的设置,但是这个 api 不在 S3 上(至少不在 S3 上),它由 elastic beanstalk 托管。
谢谢,
错误信息
504 ERROR
The request could not be satisfied.
CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.
If you received this error while trying to use an app or access a website, please contact the provider or website owner for assistance.
53 号公路
- 姓名=api.mydomain.com
- 类型=(A)别名目标=wqsdn31817
CloudFront 分布
域名=wqsdn31817
origin = dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com(如果我访问这个 url 我会看到我的 api 运行)
SSL证书=api.mydomain.com
状态=已部署
源站设置/源站域名=http://dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
源设置/源协议策略 = 仅 HTTPS
橡皮豆
Nodejs api(使用 express)
在beanstalk环境ID:e-1nasn4,URL:dummy-env.n1eijsdai.eu-west-1.elasticbeanstalk.com
CloudFront 仅在无法建立 TCP 连接或 HTTP 第一个字节响应花费的时间超过 Origin read/response 超时中配置的时间时才提供 504。
您的应用程序是否直接与 beantalk 一起工作link或者您是否有任何基于 IP 的安全组限制?