将Google域连接到Google Cloud Bucket [英] Connect Google domain to Google Cloud Bucket

查看:133
本文介绍了将Google域连接到Google Cloud Bucket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图让我的Google域连接到我的Google Cloud存储桶.我已认真遵循此页面上的所有说明:

I'm trying to get my Google domain to connect to my Google Cloud bucket. I have followed all the instructions carefully on this page:

https://cloud.google.com/storage/docs/hosting-静态网站

...,例如输入DNS编号,公开文件等.由于该域是Google域,因此已经过验证.但是,无论我做什么,我都无法获得域来存储存储桶中的文件.任何帮助将不胜感激.

...such as entering the DNS numbers, making the files public, etc. And the domain is verified since it is a Google domain. But no matter what I do, I can't get the domain to serve up the files in the bucket. Any help would be appreciated.

推荐答案

创建一个指向c.storage.googleapis.com的 CNAME别名.在那里,google cloud文档不会提供太多信息.

Create a CNAME alias that points to c.storage.googleapis.com. is where google cloud documentation does not give much information.

请按照以下步骤操作.我将以www.mydomain.com为例作为示例域.

Follow this steps. I will take an example of www.mydomain.com as a sample domain.

  1. 转到 https://domains.google.com

选择配置DNS".

转到底部的自定义资源记录"部分

Goto Custom Resource Records section at the bottom

在左侧输入框中输入 www.mydomain.com(您的域).

Put www.mydomain.com(your domain) in the left input box.

在下拉菜单中选择 CNAME . c.storage.googleapis.com 作为DATA.点击保存.名称将以www开头.不用担心.

Select CNAME in the drop down. c.storage.googleapis.com as DATA. Hit save. The name would come as www. Dont worry about that.

转到Google云端存储.创建一个新存储桶.在此处输入存储桶名称与域名相同,即 www.mydomain.com .

Goto Storage of google cloud. Create a new bucket. Give the bucket name same as the domain name ie www.mydomain.com here.

上传存储桶中的文件.

进入存储桶并授予页面公开共享权限( https://cloud.google.com/storage/docs/access-control/making-data-public#buckets ).

Go inside the bucket and give permission to the pages as share publicly (https://cloud.google.com/storage/docs/access-control/making-data-public#buckets).

在存储区列表中转到网站配置(向右3点).将首页的名称命名为主页.例如index.html.将错误页面放入404 not found输入框.点击保存,您就完成了.

Goto website configuration(3 dots towards the right) in the bucket list. Give the name of the home page to Main Page. For example index.html. Put the error page in the 404 not found input box. Hit save and you are done.

尝试运行您的网站,看看是否能够访问该页面.

Try running your website and see if you are able to hit the page.

如果由于找不到DNS而遇到错误,则说明CNAME链接存在问题.

If you are getting error as DNS not found then there is some issue with CNAME linking.

如果您从存储桶中获取错误(例如权限),这意味着您的DNS已连接到存储桶,但文件存在一些权限问题.

If you are geting error from the bucket such as permission that means that your DNS is connected to bucket but there are some permission issues with the files.

这篇关于将Google域连接到Google Cloud Bucket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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