不同端口的Route 53记录集 [英] Route 53 Record Set on Different Port

查看:28
本文介绍了不同端口的Route 53记录集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名 ruby​​ 开发人员,我刚刚开始学习一些 Node.js.

I'm a ruby dev and I just started to learn some Node.js.

我正在 AWS 上运行一个实例来托管我的 rails 应用程序,其中乘客 + nginx 监听端口 80.

I'm running an instance on AWS to host my rails apps with passenger + nginx listening on port 80.

现在我想在同一个实例 (t1-micro) 上托管一个 node.js 应用程序,并让它在端口 8000 上监听.

Now I would like to host a node.js app on the same instance (t1-micro) and put it to listen on port 8000.

如何使用 Route 53 创建记录集以将 subdomain.domain.com 指向 my.ip:8000?

How can I use Route 53 to create a Record Set to point a subdomain.domain.com to my.ip:8000?

我已经尝试设置指向 my.ip:8000 的 IPV4 记录但没有成功.

I already tried setting an IPV4 record pointing to my.ip:8000 with no success.

知道我做错了什么吗?

我可以使用 nginx 来为我的 nodejs 应用提供服务吗?

Can I use nginx to serve my nodejs apps?

推荐答案

这可以通过 S3 重定向实现.创建一个名为

subdomain.domain.com

这个存储桶不需要是公开的.然后,在属性中打开静态网站托管并选择重定向响应选项并使用以下选项对其进行配置

This bucket does not need to be public. Then, turn on Static Website Hosting in Properties and choose the Redirect response option and configure it with the following options

Target bucket or domain: my.ip:8000
Protocol: Leave this blank

然后转到Route53并使用以下配置创建记录集

Then go to Route53 and create a Record Set with the following configuration

  • 名称: subdomain.domain.com
  • 类型:A-IPv4 地址
  • 别名:
  • 别名目标:选择您刚刚在 S3 中创建的存储桶.如果它没有出现,请等待它出现.
  • 路由策略:简单
  • 评估目标健康状况:
  • Name: subdomain.domain.com
  • Type: A-IPv4 address
  • Alias: Yes
  • Alias Target: Choose the bucket you just created in S3. If it does not appear wait for it to appear.
  • Routing Policy: Simple
  • Evaluate Target Health: No

就是这样,您应该能够访问 subdomain.domain.com 并在大约 30 秒后看到更改生效.祝你好运!

And that's it, you should be able to go to subdomain.domain.com and see the changes take effect after roughly 30 seconds. Best of luck!

这篇关于不同端口的Route 53记录集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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