为 Google Cloud Storage 静态网站设置 SSL? [英] Setting up SSL for Google Cloud Storage static website?

查看:26
本文介绍了为 Google Cloud Storage 静态网站设置 SSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么方法可以通过 SSL 为位于 Google Cloud Storage 上的静态网站(实际上是 SPA)提供服务,以便用户看到漂亮的 SSL 地址和图标?

Is there any way to serve a static website (SPA actually) located on Google Cloud Storage via SSL, for that nice SSL address and icon for users to see?

亚马逊通过 CloudFront SNI 允许这样做.

Amazon allows this via CloudFront SNI.

推荐答案

是的!

通过 CNAME 重定向直接使用 GCS 仅允许 HTTP 流量.

Using GCS directly via CNAME redirects only allows HTTP traffic.

要在您自己的域中使用 HTTPS,您需要设置 Google Cloud Load Balancer,并且还可以选择设置 Google Cloud CDN.虽然它增加了一些复杂性,但 Google Cloud Load Balancer 允许您用各种内容填充域.一些资源可以由 GCS 存储桶提供,但您也可以在 GCE 中使用服务器为其他路径提供动态内容.

To use HTTPS with your own domain, you'll need to set up Google Cloud Load Balancer, and optionally you'll want to set up Google Cloud CDN as well. While it adds a bit of complexity, Google Cloud Load Balancer allows you to fill a domain with all sorts of content. Some resources could be served by a GCS bucket, but you could also have servers in GCE serving dynamic content for other paths.

这里有设置说明:https://cloud.google.com/compute/docs/load-balancing/http/using-http-lb-with-cloud-storage.

这篇关于为 Google Cloud Storage 静态网站设置 SSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆