【问题标题】:How to point Amazon S3 bucket to test subdomain like images.develop.example.com如何指向 Amazon S3 存储桶来测试像 images.develop.example.com 这样的子域
【发布时间】:2017-05-04 05:47:10
【问题描述】:

目前我正在为我的网站使用 Amazon S3 存储桶,例如 images.example.com。今天我还为开发目的构建了一个测试子域,它在 develop.example.com 中提供服务

现在我想使用develop.images.example.comimages.develop.example.com 之类的Amazon S3 存储桶(我不知道哪个是正确的)

根据S3限制可以吗?

因为亚马逊说:您的子域必须具有相同的存储桶名称。所以我创建了一个像 images.example.com 这样的存储桶

我的 cname 记录是:images.example.com.s3-website.eu-west-2.amazonaws.com

我的网络服务器是 Apache 并且在 Ubuntu 上运行

如何访问我的开发子域中的图像?


我应该创建一个新的 cname 记录吗?

我应该对我的虚拟主机文件做些什么吗?

还是什么?

【问题讨论】:

    标签: apache .htaccess amazon-s3 subdomain


    【解决方案1】:

    分享来自develop.images.example.com的静态内容:

    • 创建一个名为 develop.images.example.com 的 Amazon S3 存储桶
    • 开启静态网站托管
    • 使用 Alias=YESdevelop.images.example.com 创建 Route 53 A 记录并将其指向您的 S3 存储桶

    这与您为 images.example.com 所遵循的过程相同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-11
      • 2015-06-26
      • 2013-09-16
      • 2015-10-31
      • 2017-01-19
      • 1970-01-01
      • 2013-10-23
      • 1970-01-01
      相关资源
      最近更新 更多