使用 AWS Route 53 http 重定向工作,https 超时

Mat*_*att 2 dns https routing amazon-route53

使用此处提到的路由规则:在 Amazon Route53 中设置基于 DNS 的 URL 转发

<RoutingRules>
    <RoutingRule>
        <Redirect>
            <Protocol>https</Protocol>
            <HostName>dota2.becomethegamer.com</HostName>
            <HttpRedirectCode>301</HttpRedirectCode>
        </Redirect>
    </RoutingRule>
</RoutingRules>
Run Code Online (Sandbox Code Playgroud)

我能够看到http://becomethegamer.com正确重定向到https://dota2.becomethegamer.comhttps://becomethegamer.com超时。

我以为是那Protocol件作品,但意识到那是出站而不是入站。

这是在一个 bucked 命名中becomethegamer.com,在 Route 53 中becomethegamer.com是一个别名,目标是该存储桶。

什么可能导致 https 无法重定向?

Mic*_*bot 5

不,是这个:

网站端点不支持 https。

http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html

您不能在不说 https 的情况下重定向 https 请求,此外,您需要一个对主机名有效的 SSL 证书。

您仍然可以完全按照自己的意愿去做,但您需要在前面使用 CloudFront,在后面使用 S3。您的 S3 重定向配置保持不变,但您将创建一个 CloudFront 分配,将您的域名配置为备用域名,将您的 SSL 证书加载到 CloudFront,使用存储桶名称.s3-website-xx-xxxx-xx .amazonaws.com 网站端点(来自 S3 控制台)作为源服务器,并将 Route 53 指向 CloudFront 而不是 S3。

http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-create-cfdist.html