我正试图让我的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:
cloud.google/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的 CNAME别名.在那里,google cloud文档不会提供太多信息.
Create a CNAME alias that points to c.storage.googleapis. is where google cloud documentation does not give much information.
请按照以下步骤操作.我将以www.mydomain为例作为示例域.
Follow this steps. I will take an example of www.mydomain as a sample domain.
转到 domains.google
选择配置DNS".
转到底部的自定义资源记录"部分
Goto Custom Resource Records section at the bottom
在左侧输入框中输入 www.mydomain(您的域).
Put www.mydomain(your domain) in the left input box.
在下拉菜单中选择 CNAME . c.storage.googleapis 作为DATA.点击保存.名称将以www开头.不用担心.
Select CNAME in the drop down. c.storage.googleapis as DATA. Hit save. The name would come as www. Dont worry about that.
转到Google云端存储.创建一个新存储桶.在此处输入存储桶名称与域名相同,即 www.mydomain .
Goto Storage of google cloud. Create a new bucket. Give the bucket name same as the domain name ie www.mydomain here.
上传存储桶中的文件.
进入存储桶并授予页面公开共享权限( cloud.google/storage/docs/access-control/making-data-public#buckets ).
Go inside the bucket and give permission to the pages as share publicly (cloud.google/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
发布评论