一些细节:
Cloudfront发行版使用S3 Static网站托管端点,其类似于:bucket.name.s3-website-us-east-1.amazonaws.com.
这会重定向到实际的网站.
Origin Protocol Policy (Amazon EC2, Elastic Load Balancing, and Other Custom Origins Only)
The protocol policy that you want CloudFront to use when fetching objects from your origin server.
Important
If your Amazon S3 bucket is configured as a website endpoint, you must specify HTTP Only. Amazon S3 doesn't support HTTPS connections in that configuration.
Run Code Online (Sandbox Code Playgroud)
看来你只能拥有HTTP Only.那是对的吗?是否没有说明HTTPS Only或Match Viewer?
我问,因为我看过博客似乎表明这Match Viewer是可能的.例如
https://simonecarletti.com/blog/2016/08/redirect-domain-https-amazon-cloudfront/
https://karelledru.com/2016/06/static-site-hosting-on-S3-and-CloudFront/
这个链接说
The value of the Origin Protocol Policy field in the CloudFront console or,
if you're using the CloudFront API, the OriginProtocolPolicy element in the
DistributionConfig complex type. In the CloudFront console, the options are
HTTP Only, HTTPS Only, and Match Viewer.
Run Code Online (Sandbox Code Playgroud)
但我没有Origin Protocol Policy在控制台中看到一个字段.
这些博客正在使用旧版控制台的屏幕截图,这些屏幕允许您错误配置您的发行版.
原始协议策略是Origin的属性,仅适用于自定义源,而不适用于S3源.
但是,静态网站托管端点上的S3网站不是S3源,它是自定义源.("S3 origin"是指您正在使用存储桶的REST端点而不是网站托管端点的情况.)
对于自定义原点,它在"原点设置"中显示,从"起源"选项卡中选择原点后,以及创建新的自定义原点时... 除非您的自定义原点是S3网站端点.
当CloudFront的认识到您指定的S3网站托管端点,它不会显示为原点,将没有意义在这方面的选项...和Origin协议政策并不适用于S3网站托管端点,因为在S3静态网站托管端点不支持SSL连接. CloudFront仍然可以接受来自浏览器的HTTPS连接,但CloudFront和S3之间的连接将始终使用HTTP,用于静态网站源.这通常不是引起关注的原因,原因如下:
请参阅网站端点的S3开发者指南为我的断言,上面的文档,该网站终端不支持HTTPS或认证的要求,以及对REST端点和网站端点之间的全面的功能和功能比较.
| 归档时间: |
|
| 查看次数: |
1169 次 |
| 最近记录: |