我实际上正在开发一个网络应用程序,前端使用Reactjs,后端使用Golang.这两个程序分别托管在Google-Compute-Engine上的两个虚拟机上.我想通过https为我的应用提供服务,所以我 Select 使用Nginx为生产中的前端提供服务.首先,我制作了Nginx的配置文件:

#version: nginx/1.14.0 (ubuntu)
server {
     listen 80 default_server;
     listen [::]:80 default_server;

     root /var/www/banshee;
     server_name XX.XXX.XX.XXX; #public IP of my frontend VM

     index index.html;

     location / {
       try_files $uri /index.html =404;
     }
   }

对于这一部分,一切正常,但在那之后,我想为我的应用程序提供httpsthis tutorial次服务.我安装了软件包software-properties-commonpython-certbot-apache certbot,但当我try

sudo cerbot --nginx certonly

我得到以下信息:

gdes@frontend:/etc/nginx$ sudo certbot --nginx certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The requested nginx plugin does not appear to be installed
The requested nginx plugin does not appear to be installed

我在谷歌和这里做了一些搜索,但我仍然不知道哪个插件丢失了,或者用其他方法来修复这个问题.

有人有办法帮我吗?

非常感谢:)

推荐答案

我试图使用certbot为我的子域创建let'sencrypt证书,但出现了以下问题.

ubuntu@localhost:~$certbot--nginx-d my_子域.网站通用域名格式

Issue :

请求的nginx插件似乎未安装

Solution:

Ubuntu20+

ubuntu@localhost:~$sudo apt get install python3 certbot nginx

早期版本

ubuntu@localhost:~$sudo apt get install python certbot nginx

Reactjs相关问答推荐

在Reaction中测试条件组件

在下一个js中使用ESTAccountWithEmailAndPassword函数时循环

无法从正在使用Reaction的Electron 商务store 项目中的购物车中删除项目

关于同一位置的不同组件实例的react S规则被视为相同组件

为什么登录错误和密码在创建Reaction-Hook-Form后立即被删除?

如何在与AntD的react 中限制文件上传和显示消息?

如何使图像zoom 并移动到点击点

如何在整个应用程序中显示通用弹出窗口中的点击事件

ReactJS:唯一项目的数量总和

设置自定义形状的纹理

Mui DataGrid 在第二页和前一页上显示项目时出现问题

React Wordpress Apache 在索引之外重新加载 -> 未找到页面

为什么 useEffect 的初始化对于加载 localStorage 不起作用?

获取更多数据后更新 DOM,而不刷新 React.js 中的页面

useEffect内部的RETURN语句在首次按钮点击事件中似乎无效的原因是什么?

React对象值下降2次而不是1次

react 测试库不测试包含 react 路由 dom V6 的组件

如何使用 React 更改 Material UI 中 ButtonGroup 的 colored颜色 ?

如何保留我的下一个授权用户会话?所以我可以使用提供的 ID 在其他路由中获取数据

Rtk 查询无效标签不使数据无效