如何在Google云平台的子域上安装SSL证书。

huangapple go评论67阅读模式
英文:

How to install ssl certificate on subdomain in google cloud platform

问题

谁能帮我在托管在Google云平台上的子域上安装SSL证书。我使用Bitnami在Google云平台上创建了WordPress网站(https://demo.com),并购买了SSL证书并在Google云平台上安装了它。

我还成功在同一实例上的Google云平台上创建了子域(http://sub.demo.com)。但目前面临的问题是如何在子域(http://sub.demo.com)上安装SSL证书。

我的问题是:

1)如何在GCP上的子域上安装SSL证书?我创建子域以参考此链接https://stackoverflow.com/a/33129772/10340666

2)我在托管主域的同一实例上创建了子域。这意味着我在主域和子域上使用了相同的VM实例。我已经在主域上安装了SSL,但这个SSL证书没有安装在子域上。

我的主要问题是如何在使用相同VM实例的GCP上的子域上安装SSL。如果我使用不同的SSL证书会出现问题吗?

请帮助我。提前感谢。

英文:

Can anyone help me to install SSL certificate on sub-domain that host on google cloud platform. I'm create wordpress website(https://demo.com) using bitnami on google cloud platform and purchase ssl certificate and install it on google cloud platform.

And also i'm successfully creating sub-domain(http://sub.demo.com) on google cloud platform on same instance. But currently facing issue is how to install SSL certificate on subdomain(http://sub.demo.com).

My problem is,

  1. How to install ssl to sub-domain on gcp? I'm creating sub-domain to refer this link https://stackoverflow.com/a/33129772/10340666

  2. And i'm created sub-domain on same instance that main domain is host. That means i'm use same VM instance for main domain and sub-domain. And i'm already install ssl on main domain. But this ssl is not install on sub-domain.

My main concern is how to install ssl on sub-domain that using same VM instance on gcp. If i'm i'm using different ssl then is problem occur?

Please help me. Thanks in advance.

答案1

得分: 1

由于子域名是在bitnami.conf配置文件中创建的,您可以为Bitnami生成自管理的SSL证书。您可以按照Bitnami生成并安装Let's Encrypt SSL证书的Bitnami应用程序文档的步骤,为子域名生成和配置自管理的SSL证书。

通过使用以下命令,您可以为安装在GCP虚拟机上的多个域名/子域名生成证书。

sudo lego --email="YOUR-EMAIL" --domains="Your-Domains" --domains="Subdomains" --domains="Subdomains" --path="/etc/lego" run

然后,我们将链接新的SSL证书并配置Web服务器。

英文:

Since Sub Domains are created in the bitnami.conf config file, You can generate Self-managed SSL certificates For Bitnami. You can follow the Bitnami Generate And Install A Let's Encrypt SSL Certificate For A Bitnami Application documentation, to generate and configure the Self-managed SSL certificates for sub domains.

By using the command below, you can generate the certificates for multiple domains/sub domains which are installed in the GCP VM.

sudo lego --email="YOUR-EMAIL" --domains="Your-Domains" --domains="Subdomains" --domains="Subdomains"  --path="/etc/lego" run

Then we link the new SSL certificates and configure the web server.

huangapple
  • 本文由 发表于 2020年1月3日 19:36:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/59577939.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定