2016-01-21 119 views
1

使用路由規則這裏提到:Set up DNS based URL forwarding in Amazon Route53使用AWS路線53 HTTP重定向工作,HTTPS超時

<RoutingRules> 
    <RoutingRule> 
     <Redirect> 
      <Protocol>https</Protocol> 
      <HostName>dota2.becomethegamer.com</HostName> 
      <HttpRedirectCode>301</HttpRedirectCode> 
     </Redirect> 
    </RoutingRule> 
</RoutingRules> 

我能看到http://becomethegamer.com正確重定向到https://dota2.becomethegamer.comhttps://becomethegamer.com超時。

我認爲這是Protocol一塊,但意識到這是出站而不是入站。

這是在一個名爲becomethegamer.com和路線53 becomethegamer.com是一個別名與目標作爲該桶。

什麼可能導致https不重定向?

回答

2

沒有,那就是:

網站終端不支持HTTPS。

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

你不能沒有說話HTTPS重定向HTTPS請求,另外,你需要一個SSL證書是有效的主機名。

你仍然可以做你想做的事,但你需要在前面使用CloudFront,在後面使用S3。您的S3重定向配置保持不變,但您將創建CloudFront分配,將您的域名配置爲其中的替代域名,將SSL證書加載到CloudFront中,使用bucket-name.s3-website-xx-xxxx-xx .amazonaws.com網站端點(來自S3控制檯)作爲Origin服務器,並將Route 53指向CloudFront而不是S3。

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

+0

你是我的救星! – Matt