Static Website Hosting in GCP

  Static Website Hosting


Static Website Hosting in GCP


Static Website Hosting on Cloud Storage:-


— Login to GCP Console: 

— Create a Bucket 

— Bucket Name:-  gcs-datahouse




— Go to Cloud Shell: 


— Use below link for web templates https://www.html5webtemplates.co.uk/templates/


$ wget https://www.html5webtemplates.co.uk/wp-content/uploads/2020/05/simplestyle_banner.zip

$ ls

O/P  ——> simplestyle_banner.zip



— Now Create one directory and do all things in it:


mkdir website

$ mv simplestyle_banner.zip website/

$ ls

$ cd website 

$ ls

$ unzip simplestyle_banner.zip

$ ls

$ cd simplestyle_banner

$ ls

$ cd . .


$ gsutil -m cp -r simplestyle_banner gs://gcs-datahouse          — Authorize





Go to GCP Console:


— Bucket  gcs-datahouse

— Folder   simplestyle_banner

— Select all files or objects

— Permissions 

— +Add

— Principal              — Allusers

— Select a role

— Cloud Storage    — Storage Object Viewer.

— Save                     — Allow Public Access.

  



— Now, test your static website:


— Copy the URL of index.html file and check in Browsers.



Static Website Hosting in GCP




🙏 thanks






























Previous
Next Post »