Public object in cloud storage bucket isn't accessible through load balancer

。_饼干妹妹 提交于 2019-12-24 00:43:42

问题


I have CDN setup for my Google CLoud Storage bucket. I have uploaded a public object, you can see it with the public link here: https://storage.googleapis.com/staging.twinkle-4acfc.appspot.com/example_out_message_bg.9.png

So in order for the CDN to work, as per this question, I need to access the bucket through the load balancer.

Okay, so I setup the load balancer, this URL is directed to the bucket, and it is a public object, but the response contains an XML access error.

http://130.211.26.19/stagemedia/example_out_message_bg.9.png

In fact, you can change the path to anything, just try /a, the error is the same. Is the load balancer set up incorrectly?


回答1:


Your object needs to match the whole path, which in this case is "stagemedia/example_out_message_bg.9.png". Try creating an object with that whole name, including the "stagemedia/" part.




回答2:


You may need to have your object publicly shared as well, as described in docs here: https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing#configuring_a_bucket



来源:https://stackoverflow.com/questions/45289674/public-object-in-cloud-storage-bucket-isnt-accessible-through-load-balancer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!