HTTPS的Amazon S3的静态网站 [英] HTTPS for Amazon S3 static website
问题描述
我想举办使用Amazon S3和CloudFront的一个HTTPS,只有静态的网站。这是我到目前为止,完成的:
- 设置了一个S3存储静态网站托管,并把我的网站文件在里面
- 创建一个CloudFront的分布,并指出它的S3存储
- 加在我的域名的域名服务器的
WWW
子域名指向CloudFront的斗CNAME记录。
到目前为止,一切都很好 - 我可以使用 www.example.com
地址来访问我的网站。但是,我希望自己的网站通过HTTPS只,为此,我买了GoDaddy的SSL证书是可用的。
现在的问题是:
- 有没有办法在我的S3托管的网站上安装这些第三方SSL证书?
- 有没有办法有一个自动HTTP到HTTPS重定向与此设置?
是的,从今天开始,你可以免费做。
您现在可以在CloudFront的使用HTTPS使用的CNAME,因为它现在使用的服务器名称指示(SNI)支持自定义SSL证书:<一href="http://aws.typepad.com/aws/2014/03/server-name-indication-sni-and-http-redirection-for-amazon-cloudfront.html">http://aws.typepad.com/aws/2014/03/server-name-indication-sni-and-http-redirection-for-amazon-cloudfront.html
我设法建立一个免费的1级startssl如果证书为我的CloudFront的分布静态网站在S3上没有太多的麻烦(参见:<一href="http://stackoverflow.com/questions/22282137/cloudfront-error-when-serving-over-https-using-sni">CloudFront通过HTTPS服务使用SNI )发生错误。
I want to host a HTTPS-only static website using Amazon S3 and CloudFront. Here's what I've done so far:
- Set up an S3 bucket for static website hosting and put my website files in it
- Created a CloudFront distribution and pointed it to the S3 bucket
- Added a CNAME record in my domain's nameservers for the
www
subdomain pointing to the CloudFront bucket.
So far, so good - I can access my website using the www.example.com
address. However, I want the site to be available via HTTPS only, for which I bought an SSL certificate from GoDaddy.
Now, the question is:
- Is there a way to install this third-party SSL certificate on my S3-hosted website?
- Is there a way to have an automatic http to https redirect with this setup?
Yes, as of today you can do it at no charge.
You can now use HTTPS with CNAMEs on CloudFront as it now supports custom SSL certificates using Server Name Indication (SNI): http://aws.typepad.com/aws/2014/03/server-name-indication-sni-and-http-redirection-for-amazon-cloudfront.html
I managed to set up a free Class 1 StartSSL cert for my CloudFront distributed static site on S3 without too much trouble (see: CloudFront error when serving over HTTPS using SNI).
这篇关于HTTPS的Amazon S3的静态网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!