ãã£ããããããªäººã«èãããã®ã§ã©ããããã説æãã¾ãã
ã¶ã£ã¡ããããèããããã¨ãå¤ãã®ã§Cloud DNSæ¸ãã¾ããï¼ï½
Google Cloud Storageã§ã¯aclãå
¬éã«è¨å®ã
websiteã®è¨å®ãå
¥ãããã¨ã§ç°¡åã«éçWebãµã¤ããæ§ç¯ãããã¨ãã§ãã¾ãã
èªåã®grasys.ioã®ä¼ç¤¾ãµã¤ããGoogle Cloud Storageã§å ¬éãã¦ã¾ãã
grasys.ioã§Google Cloud Storageã®Bucketã«CNAMEããã®ã§ã¯ãªã
www.grasys.ioãCNAMEã§Google Cloud Storageã¸åãã¦
grasys.ioããã¯
GoogleApps for Worksã®ãªãã¤ã¬ã¯ãè¨å®ãwww.grasys.ioã«ãã¦ã¾ãã
Documentã¯ä»¥ä¸
Google Cloud Storage / Bucket and Object Naming Guidelines
Bucket Name Verification
ãããã¨ã¯ç°¡å
- Google Webmaster Toolsã§ãã¡ã¤ã³ã®ãªã¼ãã¼ã§ããè¨å®ãããï¼
- DNSã§CNAMEã¨ãã¦Google Cloud Storageã¸åããï¼
- Google Cloud Storageã§ãã¡ã¤ã³åã®Bucketãä½ãï¼
- Bucketã®aclãpublic-readã«è¨å®ããï¼
- Bucketã®webãè¨å®ããï¼
1. Google Webmaster Toolsã§ãã¡ã¤ã³ã®ãªã¼ãã¼ã§ããè¨å®ãããï¼
https://www.google.com/webmasters/tools/
ãµã¤ãã®URLå ¥å
ããã¤ãæ¹æ³ãç¨æããã¦ãã¾ããéçHTMLãUploadããæ¹æ³ã¯ããããBucketã®è¨±å¯ãã§ãã¦ãªãã®ã§ä¸å¯è½ã§ãã
ããã§ã¯DNSã®TXT Recordã§è¡ãã¾ãã
èªåã®å ´åã¯Google Cloud DNSãå©ç¨ãã¦ããã®ã§âãã®ä»âãé¸æ
åºã¦ããæååï¼å·¦å³ã§ã¯ã¢ã¶ã¤ã¯ãå ¥ã£ã¦ãã¾ãï¼ããã®ãã¡ã¤ã³ã®TXT Recordã¨ãã¦ç»é²ãã¾ãã
â»TXTãã¼ã¿ã¯ããã«ã³ã¼ãã¼ã·ã§ã³ã§å²ã£ã¦ããã¦ä¸ããã
ä¸è¨ã®ä½æ¥ã§ãã¡ã¤ã³ã®ãªã¼ãã¼è¨å®ã¯ä»¥ä¸ï¼
2. DNSã§CNAMEã¨ãã¦Google Cloud Storageã«åããï¼
ä¾ï¼
[subdomain] CNAME c.storage.googleapis.com.
â»èªåã¯Google Cloud DNSã§è¨å®ãã¦ã¾ãã
3. Google Cloud Storageã§ãã¡ã¤ã³åã®Bucketãä½ãï¼
ï¼ã¨ï¼ã®ä½æ¥ãçµããã¨Bucketãä½ããããã«ï¼
è£è¶³: gsutil
å人çã«ããã©ããããã§CLIã
ä¾ï¼
gsutils mb -c STANDARD-l ASIA gs://test.xxxx.jp
4. Bucketã®aclãpublic-readã«è¨å®ããï¼
é常Google Cloud Storageã§ã¯Bucketãä½ã£ã¦ãå ¬éã«ãªããªãã®ã§ä¸ã¤è¨å®ãå ¥ãã¦ãããå¿ è¦ãããã¾ãã
ãªãã¸ã§ã¯ãã®è¦å®ã®æ¨©éãç·¨éãé¸æ
ã¦ã¼ã¶ã¼ãé¸æãã¦
allUsersãå
¥å
è£è¶³: gsutil
ä¾ï¼
gsutil defacl set public-read gs://test.xxxx.jp
5. Bucketã®webãè¨å®ããï¼
è£è¶³: gsutil
ä¾ï¼
gsutil web set -m index.html -e error.html gs://test.xxxx.jp
ããã§å®äºï¼
ãã¨ã¯ã³ã³ãã³ããUploadããã ãï¼
Macã ã£ããCyberduckã¨ãã§Uploadã§ãã¾ãã
ãã èªåã¯ããã©ããã§CLIã§ãã£ã¦ã¾ãã
ä¾ï¼
gsutil -m cp -R -z js,css,html ./htdocs/* gs://test.xxxx.jp
multiã§uploadã¨å§ç¸®ãªãã·ã§ã³ã¨ãã¤ãã¦ã¾ãã
gsutil rsyncã ã¨å§ç¸®ã§ããªããã
éçãµã¤ãã®ã³ã³ãã³ããã¼ã¿ãªã®ã§cpã§ãã£ã¦ã¾ãã
â»Google Cloud Storageã¯EdgeCacheã«ä¹ãã®ã§é »ç¹ã«ãã¡ã¤ã«æ´æ°ããå ´åHTTP Headerã®metadataãå¤æ´ãã¦ä¸ãããï¼ãã£ãããããï½