【发布时间】:2019-04-12 21:59:29
【问题描述】:
我实际上正在开发一个 web 应用程序,我使用 Reactjs 作为前端,Golang 作为后端。这 2 个程序分别托管在 Google-Compute-Engine 的 2 个 VM 上。我想通过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 上通过this tutorial 提供我的应用程序。我安装了 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
我在 Google 和此处进行了一些搜索,但仍然无法确定缺少哪个插件或其他解决此问题的方法。
有人有什么想法可以帮助我吗?
非常感谢:)
【问题讨论】:
标签: reactjs nginx https lets-encrypt certbot