nginx - 如何让 nginx 将getssl 确认请求发送到正确的位置?
问题描述
我在我的服务器上为我的个人网站 codybugstein.com 使用 NGINX,该网站在带有 Angular 前端的 NodeJS 上运行。
问题是,当我尝试使用 获取 SSL 证书时getssl
,我收到一条错误消息:
cody@codyb-droplet:~$ ./getssl raphi.ca
codybugstein.com: no certificate obtained from host
Registering account
Verify each domain
Verifying codybugstein.com
copying challenge token to ~/production/client/ssl/Ysawagl1evwBenMThy*******lk28QUP0tFfqs
getssl: for some reason could not reach http://codybugstein.com/.well-known/acme-challenge/Ysawagl1evwBenMThy*******lk28QUP0tFfqs - please check it manually
如何让 nginx 正确处理这个挑战文件?
这是我的 nginx 配置(/etc/nginx/sites-available/codybugstein.com
):
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
解决方案
推荐阅读
- python - 缩短条件链
- android - com.google.gms:google-services:3.2.0 的 Ionic 3 prod 发布构建问题
- javascript - Azure 功能 JavaScript 中的无头浏览器?
- sql - SQL Server:删除用户
- android - android系统有没有机会在从playstore更新应用程序时自动清除应用程序的数据包括数据库?
- c - 查找右移量以将位索引映射到位数组中的缓冲区索引
- php - Mongo $addToSet 一个数组
- python - python pandas在迭代期间更新与先前更新的行相关的列值
- animation - UIView Draw 方法在动画子层时被多次调用
- mysql - MySQL 语句中的语法错误,无用的错误消息