我实际上正在开发一个网络应用程序,前端使用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;
}
}
对于这一部分,一切正常,但在那之后,我想为我的应用程序提供https
到this tutorial次服务.我安装了软件包software-properties-common
python-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
我在谷歌和这里做了一些搜索,但我仍然不知道哪个插件丢失了,或者用其他方法来修复这个问题.
有人有办法帮我吗?
非常感谢:)