简体   繁体   English

如何在 Google Cloid 中的一个虚拟实例上托管两个或多个网站

[英]How to host two or more Websites on one Virtual instance in Google Cloid

I have:我有:

  1. Set up a openlitespeed-wordpress-1-vm package on a virtual instance of a google compute engine.在 google 计算引擎的虚拟实例上设置 openlitespeed-wordpress-1-vm package。 This installs the following softwares:这将安装以下软件:

Operating System Ubuntu (20.04) Software WordPress (5.4.1) PHP (7.3) OpenLiteSpeed (1.6.13) phpMyAdmin (5.0.2) MariaDB (10.4) Redis (5.0.7) Memcached (1.5.22) CertBot (0.40.0 Operating System Ubuntu (20.04) Software WordPress (5.4.1) PHP (7.3) OpenLiteSpeed (1.6.13) phpMyAdmin (5.0.2) MariaDB (10.4) Redis (5.0.7) Memcached (1.5.22) CertBot (0.40.0

  1. Setup a Wordpress site on above and migrated one of my existing Wordpress websites ( say www.site1.com ) to it.在上面设置一个 Wordpress 站点并将我现有的 Wordpress 网站之一(比如www.site1.com )迁移到它。

Now, on the SAME virtual instance, I want to install ANOTHER wordpress Website ( say www.site2.com ).现在,在同一个虚拟实例上,我想安装另一个 wordpress 网站(比如www.site2.com )。

How can this be done?如何才能做到这一点? All pointers, weblinks etc. will be MUCH apreciated.所有的指针,网络链接等都将非常感谢。 I am a computer newbie but can do basic tasks such as running linux commands etc.我是计算机新手,但可以完成基本任务,例如运行 linux 命令等。

Thanks for all help !感谢所有帮助!

Doc is here .医生在这里

If you launch the VM from the 1click/Marketplace, then here's an example for you to setup a new site / virtual host in CLI command:如果您从 1click/Marketplace 启动 VM,那么这里有一个示例供您在 CLI 命令中设置新站点/虚拟主机:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.site2.com -le admin@example.com -f -w
  • -le admin@example.com is for apply Let's encrypt certificate -le admin@example.com用于申请让我们加密证书
  • -f is force to use HTTPS -f强制使用 HTTPS
  • -w is to auto setup a wordpress -w是自动设置 wordpress

PS Please run script with root privileges PS请以root权限运行脚本

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

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