如何将启用 SSL 的自定义子域指向 Elastic Beanstalk?(没有 Route53) [英] How to point SSL Enabled custom Sub Domains to Elastic Beanstalk? (without Route53)

查看:26
本文介绍了如何将启用 SSL 的自定义子域指向 Elastic Beanstalk?(没有 Route53)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将外部子域映射到我的 Elastic Beanstalk 环境中.我知道,常用的方法是使用 Route53,但是当我的客户的域提供商已经提供了 CPanel 和设置 CName 的东西时,我看不到使用它的用处 和东西.因此,我将按照以下方法将域设置为 Beanstalk.

I am trying to map an external sub domain into my Elastic Beanstalk Environment. I know, the common way is to use Route53 but I see no use of using it when my client's domain provider has already provided CPanel and stuff to set the CName and things. So, I am about to follow the below method to set domain to Beanstalk.

  1. 登录您的提供商网站并选择您的域
  2. 点击高级 DNS"
  3. 创建 CNAME 记录.
  4. 主机:www值:{{enter-your-subdomain}}.elasticbeanstalk.com.
  5. 创建 URL 重定向记录.主持人: @值:http://www.{{your-custom-domain}}.com
  1. Login to your provider website and select your domain
  2. Click on "Advanced DNS"
  3. Create a CNAME record.
  4. host: www value: {{enter-your-subdomain}}.elasticbeanstalk.com.
  5. Create a URL Redirect record. host: @ value: http://www.{{your-custom-domain}}.com

通过执行上述操作,我希望使用 subdomain.example.com 而不是 subdomain-region.elasticbeanstalk.com

By doing the above, I expect to have subdomain.example.com instead of subdomain-region.elasticbeanstalk.com

您可以在此查看详细信息 - https://colintoh.com/blog/map-custom-domain-to-elastic-beanstalk-application

You can see detailed info in this - https://colintoh.com/blog/map-custom-domain-to-elastic-beanstalk-application

我将把它应用到两件事上.

I am going to apply this to 2 things.

  1. 驻留在 Beanstalk 中的 REST API.(少数移动和网络应用会使用)
  2. 驻留在 Beanstalk 中的 Web 门户应用.

现在,我可以看到我的客户端已经有几个子域用于其他目的,并且启用了 SSL.他们从 CA 购买了 SSL.因此,我们是否可以在 CPanel 中启用 SSL 并将启用 SSL 的子域指向 Beanstalk?或者我们必须重新配置 Route53 中的所有内容并完成他们设置 SSL 的复杂过程?

Now, I can see my client already has couple of subdomains for other purposes with SSL enabled. They have purchased SSL from a CA. Therefor, can we enable SSL in CPanel and point the SSL enabled sub domains to Beanstalk? Or we have to reconfigure everything in Route53 and go through their complex process of setting up the SSL?

推荐答案

使用外部供应商颁发的 SSL 证书

从 SSL 供应商的角度来看,您需要三个文件:certificate-chain.pem、https-cert.crt 和 private-key.pem.

Using SSL certificates issued by external vendor

From the side of SSL vendor you would need three files : certificate-chain.pem, https-cert.crt and private-key.pem .

步骤如下:

  1. 将证书导入 ACM

  1. Import certificate to ACM

aws acm import-certificate –certificate file://https-cert.crt–private-key file://private-key.pem –certificate-chainfile://certificate-chain.pem

导入完成后,从控制台编辑 AWS Elasticbeanstalk 中的负载均衡器设置以选择导入的证书.有关详细的分步说明,请参阅 https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html .

Once the import is complete to edit Load Balancer settings in AWS Elasticbeanstalk from Console to choose the imported certificate. For detailed step by step instruction refer https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html .

使用来自 AWS ACM 的 SSL 证书

步骤如下:

  1. 在 Route 53 中创建一个公共托管区域,并讨论子域(比如 app.mydomain.com).AWS 将返回多个 ns 服务器名称.
  2. 在现有域注册商中为 app.mydomain.com 创建 SOA 记录,指向在步骤 1 中返回的 ns 服务器名称.
  3. 转到 ACM 并为 app.mydomain.com 创建域验证证书.
  4. 从控制台编辑 AWS Elasticbeanstalk 中的负载均衡器设置以选择新的 ACM 证书.有关详细的分步说明,请参阅 https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html .

这篇关于如何将启用 SSL 的自定义子域指向 Elastic Beanstalk?(没有 Route53)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆