无法使用 Route 53 将子域重定向到 Elastic Beanstalk 环境
目标:为了设置一个重定向到弹性 beanstalk 实例的子域,
我最近从 GoDaddy 购买了一个域 (tscthub.co.uk),通过 GANDI 将其转移到“AWS Route 53”,并正在等待 SSL 获得批准通过“AWS 证书管理器”。
我使用 本指南。它已启动并正在运行,我可以成功访问它。虽然元数据库 env url 运行良好,但 公共 IPv4 地址 和 公共 IPv4 DNS 在以下情况下不加载任何内容我跟着他们。
接下来,我尝试遵循 “将流量路由到AWS Elastic Beanstalk 环境” AWS 文档中的指南。在“AWS Route 53”中,我首先为“tscthub.co.uk”创建了一个新的公共托管区域。我编辑了注册域中的命名服务器以匹配托管区域的服务器。然后,因为我的“AWS Elastic Beanstalk”环境 url 中包含该区域,所以我认为我可以按照指南使用别名,但是,在尝试时我收到错误“同一托管区域中另一条记录的别名是全球且仅在美国东部(弗吉尼亚北部)可用”,不幸的是我正在使用“eu-west-2”(此评论 更详细地讨论这个问题)。
因此,我只是使用回退方法创建一个新的 CNAME 记录,其中记录名称为“test.tscthub.co.uk”,值为“http://metabase-env.eba-i2ysq7n4.eu-west-2”。 elasticbeanstalk.com/'。等待了几个小时后,所有内容都重新路由,然后我尝试访问“http://test.tscthub.co.uk/”,但我只是得到“无法访问此网站”。
Aim: To set-up a subdomain that redirects to an elastic beanstalk instance
I recently bought a domain (tscthub.co.uk) from GoDaddy, transferred it over to 'AWS Route 53' via GANDI, and am waiting on SSL to be approved via 'AWS Certificate Manager'.
Separately I created an 'AWS Elastic Beanstalk' application running Metabase using this guide. This is up and running and I can successfully access it. Whilst the metabase env url works nicely, the public IPv4 address and public IPv4 DNS don't load anything when I follow them.
Next I tried to follow the "Routing traffic to an AWS Elastic Beanstalk environment" guide on the AWS docs. In 'AWS Route 53' I first created a new public hosted zone for 'tscthub.co.uk'. I edited the named servers in the registered domain to match that of the hosted zone. Then because my 'AWS Elastic Beanstalk' environment url had the region within it I thought I could use an alias as per the guide, however, upon trying I got the error "an alias to another record in the same hosted zone are global and available only in US East (N. Virginia)" and unfortunately I'm using 'eu-west-2' (this comment talks about this issue in more detail).
I therefore just used the backfall approach of creating a new CNAME record where the record name was 'test.tscthub.co.uk' and the value was 'http://metabase-env.eba-i2ysq7n4.eu-west-2.elasticbeanstalk.com/'. After waiting a couple of hours for everything to reroute I then tried to access 'http://test.tscthub.co.uk/' but I just get "This site can’t be reached".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,“将流量路由到AWS Elastic Beanstalk 环境” 指南没有提及的是,您只需创建一个“A”记录并将其设置为 Elastic Beanstalk 环境...
It turns out that what the "Routing traffic to an AWS Elastic Beanstalk environment" guide fails to mention is that you can just create an "A" record and set that to the elastic beanstalk environment ...