简体   繁体   English

是否可以在Google Cloud Platform的一个存储桶上托管多个网站?

[英]Is it possible to host multiple websites on one bucket on Google Cloud Platform?

Which is a better way to host multiple websites, all of them being static? 托管多个都是静态的网站是哪种更好的方法? Some are WordPress. 有些是WordPress。 Should I create different buckets for all or host all on a single bucket itself? 我应该为所有人创建不同的存储桶还是在单个存储桶本身上托管所有存储桶? Please let me know how can I host it on a single bucket. 请让我知道如何将其托管在一个存储桶中。

Following the official documentation for hosting a static website on Google Cloud Storage, you'll have to point a domain to the resource you want to serve, ie www.example.com. 遵循在Google Cloud Storage上托管静态网站的官方文档之后,您必须将域指向要提供的资源,即www.example.com。 You need to create a bucket with that name, so you'll need one bucket per domain. 您需要使用该名称创建一个存储桶,因此每个域需要一个存储桶。

Good thing is that you can create as many bucket as you want for no extra charge, as per Quotas & Limits . 好消息是,您可以根据配额和限制创建任意数量的存储桶,而无需支付额外费用。

Last thing I'd like to point out is that Wordpress actually isn't a static website. 我要指出的最后一件事是,WordPress实际上不是一个静态网站。 It's built in PHP which won't execute on Storage. 它是用PHP内置的,无法在Storage上执行。 There are plugins though that can generate a static website from your wordpress (or you could use App Engine Flexible ). 尽管有一些插件可以从您的wordpress生成静态网站(或者您可以使用App Engine Flexible )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM