简体   繁体   中英

Google Cloud with Google Domain, static website ssl cert not valid

My domain is registered with Google Domains. I put up my static website on Google Cloud Storage. The Cname record being c.storage.googleapis.com.

I had an SSL cert already for this domain, and wanted to set it up. I uploaded the SSL cert successfully to Google Cloud App Engine. It gave me a new Cname value to tie to my DNS, this time ghs.googlehosted.com

I can't do both for www

Anybody know whats up? I thought there would be a simple way to point my existing ssl certificate to my domain without having to do load balancing or anything too complicated. There is very little traffic to the site. I transferred everything over from a different hosting provider, and this is the only issue.

Possible solutions -

  1. To use HTTPS with your own domain, you'll need to set up Google Cloud Load Balancer. 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.

  2. Use firebase to host your SPA, they by default have https.

  3. Use App engine to serve static files https://github.com/ncruces/appengine-hosting

  4. Use something like cloudflare infront of it, which provides https for custom domain.

In order to host your static web page within a Cloud Storage bucket and use HTTPS, you need to configure a load balancer with a static external IP address. This guide [1] shows how to configure load balancing service and sending traffic to the instances. You can follow the configurations, skipping the instance parts since your goal is sending traffic to a bucket.

Afterwards, route your load balancer to the Cloud Storage bucket having your static web page [2] .

Finally, go to your domain host and set an A Record, instead of CNAME [3] , hitting your load balancer's external IP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM