如何使用AWS路线53设置子 [英] How can I use AWS Route 53 to set up a subdomain

查看:231
本文介绍了如何使用AWS路线53设置子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很迷茫......

I'm very confused...

我只是让我的头围绕整个DNS的东西,虽然它很容易理解,我无法设置使用路线53.子域我已经建立了一个纪录为我的新域(论证的缘故,让我们把它叫做 mydomain.com。和它完美的作品!我想现在能够做的是建立一个子域( api.mydomain.com。),这应该指向 mydomain.com/api

I'm just getting my head around the whole DNS thing and, while it's simple enough to understand, I'm having trouble setting up subdomains using Route 53. I've set up the A Record for my new domain (for argument's sake, let's call it mydomain.com. and it works perfectly! What I'd like to be able to do now is set up a subdomain (api.mydomain.com.), which should point to mydomain.com/api.

我怎样才能做到这一点使用AWS?

How can I achieve this using AWS?

下面是我的一些架构的更多信息。

Here's some more info on my architecture.

域名注册➜路53➜魔豆➜ELB➜Linux的EC2实例➜的Apache2

Domain Name Registrar ➜ Route 53 ➜ Beanstalk ➜ ELB ➜ Linux EC2 Instance ➜ Apache2

我不关心,我需要做的,只要我能做到这一点。此外,如果有一对夫妇的方式来实现这一目标,就更好了! :)

I don't care where I need to do it, so long as I can do it. Moreover, if there's a couple of ways to achieve it, then all the better! :)

在此先感谢。

推荐答案

您想安装一个CNAME(瑞安建议):

You would want to setup a CNAME (as Ryan suggested):

api.mydomain.com.  CNAME mydomain.com.

然后,你可以创建一个虚拟主机为api.mydomain.com。在Apache和使用mod_rewrite重写 http://api.mydomain.com/foo http://api.mydomain.com/api/富

这篇关于如何使用AWS路线53设置子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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