简体   繁体   English

如何将Amazon S3存储桶指向测试像images.develop.example.com这样的子域

[英]How to point Amazon S3 bucket to test subdomain like images.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 目前,我在我的网站(如images.example.com使用Amazon S3存储桶。今天,我还出于开发目的构建了一个测试子域,该子域在develop.example.com

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) 现在我想使用Amazon S3存储像develop.images.example.comimages.develop.example.com (我不知道哪个是正确的)

Is it possible according to S3 restrictions? 是否可以根据S3限制进行操作?

Because Amazon says: You must have same bucket name with your subdomain. 因为Amazon说: 您的子域必须具有相同的存储桶名称。 So I was create a bucket like images.example.com 所以我创建了一个像images.example.com这样的存储images.example.com

and my cname record is: images.example.com.s3-website.eu-west-2.amazonaws.com 而我的cname记录是: images.example.com.s3-website.eu-west-2.amazonaws.com

My webserver is Apache and runs on Ubuntu 我的网络服务器是Apache,可以在Ubuntu上运行

How can reach to my images on my development subdomain? 如何在我的开发子域上访问我的图像?


Should I create a new cname record? 我应该创建一个新的cname记录吗?

Should I do something on my virtual host file? 我应该在虚拟主机文件上做什么吗?

or what? 要不然是啥?

To share static content from develop.images.example.com : 要共享来自develop.images.example.com静态内容:

  • Create an Amazon S3 bucket called develop.images.example.com 创建一个名为develop.images.example.com的Amazon S3存储桶
  • Turn on static website hosting 打开静态网站托管
  • Create a Route 53 A record for develop.images.example.com with Alias=YES and point it to your S3 bucket 使用Alias=YESdevelop.images.example.com创建Route 53 A记录,并将其指向您的S3存储桶

This is the same process as you would have followed for images.example.com . 这与处理images.example.com过程相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将www.subdomain.example.com重定向到subdomain.example.com - redirecting www.subdomain.example.com to subdomain.example.com 如何保护Amazon S3 URL - How to secure an Amazon S3 URL 如何在Apache服务器中虚拟地将http://example.com指向http://ex2.com/example? - How can I virtually point http://example.com to http://ex2.com/example in apache server? 如何将我的URL像www.example.com/profile.php?id=xyz转换为www.example.com/xyz? - How do i convert my URL's like www.example.com/profile.php?id=xyz into www.example.com/xyz? 如何将子域指向子文件夹 - How to point a subdomain to a subfolder 如何使用MAMP将文件上传到Amazon S3? - How to upload file to amazon s3 using MAMP? 如何将网址从www.example.com/index.php?store=test重写为.htacess中的test.example.com或www.test.example.com - How to rewrite the url from www.example.com/index.php?store=test to test.example.com or www.test.example.com in .htacess 如何指向Amazon EC2实例的本地主机? - How to point to the Amazon EC2 instance's localhost? 如何使用Amazon Lightail + S3重定向+路由53强制HTTPS - How to force HTTPS with amazon lightsail + s3 redirection + route 53 如何将“www.example.com/test.html”转为“www.example.com/test”? (.htaccess) - How do I turn “www.example.com/test.html” to “www.example.com/test” ? (.htaccess)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM