网站域重定向到Amazon Web Services存储桶的URL [英] Site domain redirecting to the url of amazon web services bucket

查看:131
本文介绍了网站域重定向到Amazon Web Services存储桶的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个静态网站,当前正托管在一个AWS S3存储桶中:mysite.com

I have a static website which is currently being hosted in an AWS S3 bucket: mysite.com

我使用GoDaddy购买了mysite.com的域,并且我正在配置此URL,以便它指向我的AWS S3存储桶.我相信我已经正确配置了S3存储桶,因为mysite.com.s3-website-us-east-1.amazonaws.com为我的静态站点提供服务.

I used GoDaddy to purchase the domain for mysite.com and I'm in the process of configuring this URL so that it points to my AWS S3 bucket. I believe I've configured the S3 bucket correctly as mysite.com.s3-website-us-east-1.amazonaws.com serves my static site.

但是,我的AWS Route 53出现了问题.我设置了一个具有别名,名称服务器和授权开始的托管区域.

However, I have a problem with my AWS Route 53. I set up a hosted zone with an alias, nameservers, and a start of authority.

我的问题是,当我在浏览器中转到mysite.com时,我被重定向到mysite.com.s3-website-us-east-1.amazonaws.com.该地址可以从该地址正确访问该网站,但我想知道为什么将我重定向到AWS URL.

My problem is that when I go to mysite.com in my browser, I am redirected to mysite.com.s3-website-us-east-1.amazonaws.com. The site is correctly served from that address but I'm wondering why I'm being redirected to the AWS url.

更新- 这是在终端中运行curl -IXGET mysite.com的结果:

Update - This is the result of running curl -IXGET mysite.com in the terminal:

HTTP/1.1 200 OK
x-amz-id-2: FdG4UIjsT2AYvWlGZgtZFnUCoC5rlEpUoDWslfTiLxdtqfER5/VrK5pNaR0WgNQH+VtXvLM0dc0=
x-amz-request-id: D7F6E1CD65C36959
Date: Mon, 01 Aug 2016 17:46:39 GMT
Last-Modified: Tue, 26 Jul 2016 22:10:36 GMT
ETag: "c4388dce1539caba654edf75cc674b7e"
Content-Type: text/html
Content-Length: 10364
Server: AmazonS3

推荐答案

我只能建议仔细检查我刚刚在这里测试了相同的设置,并且域没有重定向.

I just tested the same setup here, and the domain does not redirect.

在S3存储桶属性下,确保未将将所有请求重定向到另一个主机名"设置为错误的地址.

Under the S3 bucket properties, make sure the Redirect all requests to another host name is not set to an incorrect address.

确保Route 53记录正在使用IP别名记录,如本教程中所示.

Make sure the Route 53 record is using an IP alias record, as shown in the tutorial.

这篇关于网站域重定向到Amazon Web Services存储桶的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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