【问题标题】:Cloudflare nginx server nodejs app SSL errorCloudflare nginx 服务器 nodejs 应用 SSL 错误
【发布时间】:2021-09-03 01:40:54
【问题描述】:

我在 /etc/nginx/sites-avaible 有一个配置。我的项目在 3010 端口上工作。我将我的域 dns 重定向到 cloudflare,激活到 SSL。但我无法联系到https://domain.xyz。 我是 devops 的新手。

upstream zapbot.xyz {
    server 127.0.0.1:3010;
    keepalive 8;
}

server {
    listen 80;
    listen [::]:80;
    server_name zapbot.xyz www.zapbot.xyz;
    access_log /var/log/nginx/zapbot.xyz.log;

    location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;

      proxy_pass http://zapbot.xyz/;
      proxy_redirect off;
    }

 }

【问题讨论】:

  • 在 cloudflare 上您是否使用了“ssl > full”选项?您可能还需要在端口 443 上添加监听。您可以通过在 couldflare 上将“完整”更改为“灵活”来测试它,这将使 cloudflare 在 nginx 中的端口 80 上与您的站点通信。
  • 嗨,Cargrison,您能否确认这是否解决了您的问题?如果是,@sur.la.route 请将此作为您的答案,以便可以将此问题标记为已回答并关闭...

标签: ubuntu nginx ssl cloudflare


【解决方案1】:

在 cloudflare 上,您是否使用了“ssl > full”选项?您可能还需要在端口 443 上添加监听。您可以通过在 couldflare 上将“完整”更改为“灵活”来测试它,这将使 cloudflare 在 nginx 中的端口 80 上与您的站点通信。

【讨论】:

    猜你喜欢
    • 2018-10-23
    • 2017-05-16
    • 1970-01-01
    • 2021-07-25
    • 1970-01-01
    • 1970-01-01
    • 2016-08-28
    • 2018-08-23
    • 2017-08-30
    相关资源
    最近更新 更多