如何在Cloudfront上应用CDN-路由器53 =>lightail实例 [英] How to apply CDN with cloudfront - router 53 => lightsail instance

查看:57
本文介绍了如何在Cloudfront上应用CDN-路由器53 =>lightail实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是AWS的新手,我正在努力设置子域访问权限,我的资料是:

i am newbie to AWS and i am struggling set up subdomain access , my materials are :

  • 53号公路:我的域名是tranthanhbao.com

  • Route 53 : my domain is tranthanhbao.com

Lightsail实例:18.140.2.35.我已经设置了nginx反向代理,并在Route 53中使用A-ipv4将 aws.tranthanhbao.com 指向18.140.2.35.效果不错在53号公路上将我的设置更改为18.140.2.35:

Lightsail instance : 18.140.2.35 . I already set up nginx reverse proxy and in Route 53 point aws.tranthanhbao.com to 18.140.2.35 with A - ipv4 . It work well MY setting in Route 53 to 18.140.2.35 :

Cloudfront :现在,我要使用以下设置将Cloudfront应用于我的域 aws.tranthanhbao.com (http将重定向到https)

Cloudfront : now i want to apply cloudfront to my domain aws.tranthanhbao.com (http will redirect to https) with below setting

然后,当我们访问 dsor8zoqxftko.cloudfront.net 时,它运行良好,但我检查了域ip,显示:

Then when we access dsor8zoqxftko.cloudfront.net, it works well but i check domain ip , it show :

  • [http://dsor8zoqxftko.cloudfront.net/] : this is from France and automatic redirect http to https. So it works well BUT
  • [http://aws.tranthanhbao.com/] : still http and from my Lightsail instance IP .

所以我的问题是我该如何在Cloudfront而不是链接上应用 aws.tranthanhbao.com :[http://dsor8zoqxftko.cloudfront.net/]

So my question is how can I apply aws.tranthanhbao.com with cloudfront, not Link: [http://dsor8zoqxftko.cloudfront.net/]

推荐答案

您可以尝试以下步骤:

  1. 18.140.2.35 指向其他名称,例如 origin.tranthanhbao.com origin.tranthanhbao.com ->18.140.2.35
  2. origin.tranthanhbao.com 定义为CloudFront的起源,而不是 aws.tranthanhbao.com
  3. 修改 aws.tranthanhbao.com 的路由记录,然后选择Alias记录(A记录)并选择CloudFront分配.
  1. Point 18.140.2.35 to some other name like origin.tranthanhbao.com origin.tranthanhbao.com --> 18.140.2.35
  2. Define origin.tranthanhbao.com as an Origin of CloudFront instead of aws.tranthanhbao.com
  3. Modify Route Record for aws.tranthanhbao.com and Choose Alias record (A record) and choose CloudFront distribution.

这篇关于如何在Cloudfront上应用CDN-路由器53 =>lightail实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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