我正在开发一个 Web 应用程序,前端使用 Reactjs
,后端使用 Golang
。这两个程序分别托管在 Google-Compute-Engine
上的两个虚拟机上。我想通过 https
来提供我的应用程序,因此我选择在生产环境中使用 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
服务我的应用程序。我安装了软件包 software-properties-common
、python-certbot-apache
和 certbot
,但是当我尝试运行
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-nginx
。 - undefined