阅读背景:

适用于GoDaddy的HTTPS - AWS S3静态网站

来源:互联网 

I want to host a HTTPS-only static website using Amazon S3 and GoDaddy. Here's what I've done so far:

我想使用Amazon S3和GoDaddy托管仅支持HTTPS的静态网站。这是我到目前为止所做的:

 a) Created S3 static website at Amazon 
 b) Added S3 static URL at GoDaddy's CNAME records
     CNAME **NAME**: *WWW* and **HOST** : *mywebsite.com.s3-website.ap-south-1.amazonaws.com*  
 c) Then in forwading **Domain** section added https://mywebsite.com

Now, I can access my website using https://mywebsite.com address. However, I want the site to be available via HTTPS only, for which I bought an SSL certificate from GoDaddy. And did setup on GoDaddy.

现在,我可以使用https://mywebsite.com地址访问我的网站。但是,我希望该网站仅通过HTTPS提供,我从GoDaddy购买了SSL证书。并在GoDaddy上进行了设置。

Now, the question is: Is there a way to have an automatic http to https redirect with this setup?

现在,问题是:有没有办法通过此设置自动http到https重定向?

1 个解决方案

#1


1  

You need to use CloudFront to serve HTTPS requests for an Amazon S3 Bucket. Amazon published Key Differences Between the Amazon Website and the REST API Endpoint to highlight website hosting on s3 does not support SSL connections.

您需要使用CloudFront为Amazon S3存储桶提供HTTPS请求。亚马逊发布了亚马逊网站和REST API端点之间的关键差异,以突出显示s3上的网站托管不支持SSL连接。

However, this tutorial by Amazon will walk you through creating a CloudFront distribution to serve s3 content using HTTPS.

但是,亚马逊的本教程将引导您创建CloudFront分发以使用HTTPS提供s3内容。


分享到: