【问题标题】:How to config two different applications in different EC2 instances under the same domain in Route53?如何在Route53的同一域下的不同EC2实例中配置两个不同的应用程序?
【发布时间】:2019-09-13 03:31:40
【问题描述】:

我正在不同的 EC2 实例中设置新的两台服务器,并希望在每个 EC2 实例上运行两个不同的应用程序:

3.14.23.108:8080/clients 18.23.34.23:8080/products

我需要这些端点在同一个域 Route53 下运行:

www.mydomain.com

我希望有这样的:

www.mydomian.com/clients www.mydomian.com/products

我知道 AWS 的一些服务,例如 ELB、Api Gateway 和 CloudFront,但没有找到好的示例或教程。

【问题讨论】:

    标签: amazon-web-services amazon-ec2 amazon-route53


    【解决方案1】:

    您可以使用路径基础路由设置 AWS 应用程序负载均衡器。

    https://docs.aws.amazon.com/elasticloadbalancing/latest/application/tutorial-load-balancer-routing.html

    【讨论】:

      【解决方案2】:

      您可以将 API Gateway 与特定 EC2 实例的代理一起使用。请参阅底部搜索“使用 HTTP 代理集成”中的 https://aws.amazon.com/blogs/aws/api-gateway-update-new-features-simplify-api-development/ 并指定 HTTP。然后将 Route53 别名设置为 API 网关。

      【讨论】:

      • 因为比ELB性价比最高,所以Api Gatway是解决这个问题的最佳方式。谢谢!
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-03
      • 1970-01-01
      • 1970-01-01
      • 2013-01-08
      • 2022-10-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多