reactjs - 如何在部署在谷歌云上的 npx 命令创建的 React 应用程序中启用 https。需要使用从 Godaddy 购买的证书

标签 reactjs ssl google-cloud-platform debian-based godaddy-api

我们在 React 中开发了网站,第一步是使用 npx 命令创建 React 应用程序。 这个 react 部署在谷歌云上,部署在 80 端口时一切正常。 当我们想将 http 转换为 https 时,我们遇到了问题。我们已经从 godaddy 购买了 SSL 证书,并希望使用它们将 http 转换为 https。

如果您已经解决了这个问题,请帮助我们解决这个问题。

最佳答案

在 Google Cloud Platform 中,有两种启用 SSL 证书的方法(由 Google 管理并由 Let's Encrypt 签名的 SSL 证书或您自己的 SSL 证书,如您的情况):

1- Google 托管的 SSL 证书是自动配置的。要确保通过转到 App Engine > Settings > Custom Domains 来检查控制台,请检查 link .

2- 你自己的 SSL(你的情况):检查这个 fully detailed instructions .

在这两种情况下,请确保您的自定义域已经是 mapped to your application and you have configured your DNS record

关于reactjs - 如何在部署在谷歌云上的 npx 命令创建的 React 应用程序中启用 https。需要使用从 Godaddy 购买的证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59435844/

相关文章:

redirect - NGINX https ://www. example.com/index.php 到 https ://www. example.com/redirect 怎么办?

ssl - 如何在 groovy 中使用带有自签名证书的 SSL?

amazon-web-services - AWS 不同地区的同通配符证书

google-cloud-platform - AI平台笔记本虚拟机 `jupyter`用户默认密码是多少?

google-cloud-platform - MQTT 谷歌云与 ESP8266 连接

reactjs - 路径上的 Eslint 导入/无无关依赖错误

reactjs - Reactjs 中的 EsLint "react/jsx-props-no-spreading"错误禁用

javascript - fetch 返回 SyntaxError : Unexpected token T in JSON at position 0

java - GCS - 上传较大大小的文件时出现堆错误

reactjs - 如何检测用户是否在 native react 中放大或缩小