如何将Amazon S3存储桶指向测试像images.develop.example.com之类的子域 [英] How to point Amazon S3 bucket to test subdomain like images.develop.example.com
问题描述
目前,我正在像images.example.com
这样的网站上使用Amazon S3存储桶.今天,我还出于开发目的构建了一个测试子域,该子域在develop.example.com
Currently I'm using Amazon S3 bucket for my website like images.example.com
.Today I also built a test subdomain for development purposes and it is served in develop.example.com
现在我想使用develop.images.example.com
或images.develop.example.com
之类的Amazon S3存储桶(我不知道其中哪个是正确的)
Now I want to use Amazon S3 bucket like develop.images.example.com
or images.develop.example.com
(I don't know which of them is correct)
是否可以根据S3限制?
Is it possible according to S3 restrictions?
因为亚马逊说:您的子域必须具有相同的存储桶名称.因此,我创建了一个类似于images.example.com
Because Amazon says: You must have same bucket name with your subdomain. So I was create a bucket like images.example.com
我的cname记录是:images.example.com.s3-website.eu-west-2.amazonaws.com
and my cname record is: images.example.com.s3-website.eu-west-2.amazonaws.com
我的网络服务器是Apache,可在Ubuntu上运行
My webserver is Apache and runs on Ubuntu
如何在我的开发子域上访问我的图片?
How can reach to my images on my development subdomain?
我应该创建一个新的cname记录吗?
Should I create a new cname record?
我应该在虚拟主机文件上做些什么吗?
Should I do something on my virtual host file?
还是什么?
推荐答案
要共享develop.images.example.com
中的静态内容:
- 创建一个名为
develop.images.example.com
的Amazon S3存储桶
- 打开静态网站托管
- 使用
Alias=YES
为develop.images.example.com
创建Route 53A
记录,并将其指向您的S3存储桶
- Create an Amazon S3 bucket called
develop.images.example.com
- Turn on static website hosting
- Create a Route 53
A
record fordevelop.images.example.com
withAlias=YES
and point it to your S3 bucket
这与您对images.example.com
执行的过程相同.
This is the same process as you would have followed for images.example.com
.
这篇关于如何将Amazon S3存储桶指向测试像images.develop.example.com之类的子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!