如何为s3存储桶指定子域? [英] how appoint a subdomain for a s3 bucket?
问题描述
早上好
我正在使用Amazon s3存储桶作为图像服务器. 我想使用我网站的子域,如何解决这个问题. 例如:一张图片现在位于: https://s3-sa-east-1. amazonaws.com/nomeBucket/pasta/imag.png ,我可以通过相同的链接进行访问.
I am using amazon s3 bucket as the image server. And I want to use a subdomain of my site, how to address this bucket. eg: a picture is now in: https://s3-sa-east-1.amazonaws.com/nomeBucket/pasta/imag.png, and I access it through this same link.
会是这样吗:imagens.mydomain.com.br/文件夹/imag.png 有什么办法可以做到吗?指定子域地址到存储桶? 我已经尝试过将亚马逊的53号公路命名为CNAME.我尝试了此操作: https://s3-sa-east-1.amazonaws.com/nomeBucket/
Would that it were so: imagens.mydomain.com.br / folder / imag.png Is there any way I can do this? appoint a subdomain address to a bucket? I've tried the amazon route 53, as CNAME. I tried this: https://s3-sa-east-1.amazonaws.com/nomeBucket/
我昨天参加了考试,但显然没有用. 有人已经做过类似的事情,并且/或者知道如何帮助我?
I took the test yesterday, but apparently it did not work. Someone already did something similar, and / or know how to help me?
注意:我正在使用nginx.还需要为子域配置它吗?
Note: I'm using nginx. also need to configure it for subdomain?
谢谢
推荐答案
您需要重命名存储桶以匹配自定义域名(例如imagens.mydomain.com.br
),并将该域设置为
You need to rename your bucket to match the custom domain name (e.g. imagens.mydomain.com.br
) and set up that domain as a CNAME to
<bucket-name>.s3.amazonaws.com.
(在您的情况下为imagens.mydomain.com.br.s3.amazonaws.com.
此处提供了完整的说明:
The full instructions are available here:
http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting .html
这篇关于如何为s3存储桶指定子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!