2
votes

I have a Cloud storage bucket with static files in it.

I have set up a load balancer with Cloud CDN enabled on the cloud bucket above.

When I go to the public_IP assigned in the load balancer I get an xml error message access denied as this is just an ip, not a landing page.

When I go to public_ip/index.html, then the website load.

EDIT (removing) :The content of the bucket will only be served by a sub-domain of an external domain name, that's why I can't name my bucket as the domain name. It is possible to rename a bucket as a subdomain, and the landing page definition works, but the base question remains.

Is there a possibility to set the landing page for the IP address anyhow?

1

1 Answers

1
votes

Yes, it's possible to configure a landing page for any Cloud Storage bucket using the gsutil command line tool. For example, the following command configures the landing page for the bucket named elving:

gsutil web set -m index.html gs://elving

Unfortunately, it's not currently possible to configure this using the Google Cloud Console. You must use the API directly or use a tool such as gsutil. You can find more information about gsutil at https://cloud.google.com/storage/docs/gsutil.