【问题标题】:How to configure a secure (HTTPS) domain with Redbird reverse proxy如何使用 Redbird 反向代理配置安全 (HTTPS) 域
【发布时间】:2016-11-08 13:14:40
【问题描述】:

我想知道如何使用 Redbird 代理正确配置安全域。基本的info 有点混乱,因为示例有些零散。我想应该可以自动使用letsencrypt(如那里声称的那样)。

我试过了:

   var proxy = require('redbird')({
     port:80,
     ssl: {
       port: 3000,
       letsencrypt: {
           path: '../SSL-certs',
       }
     }
   });
  proxy.register('secure-web.net', 'http://xx.xx.xxx.xxx:8080',{
      ssl: {
        letsencrypt: {
          email: 'my@mail.com'
        }
      }
  });
  proxy.register('insecure-web.net', 'http://xx.xxx.xx.xxx:6881');

终端抛出(当我尝试访问该页面时):

{"name":"redbird","hostname":"honza-kvm","pid":3089,"level":50,"err":{"message":"140009434470272:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher:../deps/openssl/openssl/ssl/s3_srvr.c:1418:\n","name":"Error","stack":"Error: 140009434470272:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher:../deps/openssl/openssl/ssl/s3_srvr.c:1418:\n"},"msg":"HTTPS Client  Error","time":"2016-11-08T13:03:37.979Z","v":0}

Firefox 抛出:

Error code: SSL_ERROR_NO_CYPHER_OVERLAP

目录 SSL-certs 是故意为空的(它似乎应该根据手册页)但也许我需要一些关于通过 Redbird 使用 letsencrypt 的重要信息。

【问题讨论】:

    标签: ssl reverse-proxy lets-encrypt redbird


    【解决方案1】:

    这个例子为我现有的 localhost:8080 启用了 http 和 https。

    var proxy = require('redbird')({
      port: 80
      xfwd: false,
      letsencrypt: {
        path: "certs",
        port: 3000
      },
      ssl: {
        port: 443
      }
    });
    
    proxy.register("www.example.com", "http://localhost:8080", {
        ssl: {
        letsencrypt: {
          email: "me@example.com",
          production: false
          }
        }
    });
    

    另外,当从 production:false 切换到 production:true 时,我发现证书颁发者仍然是

    假 LE 中级 X1

    我完全删除了certs目录的内容,重新启动代理找到

    让我们加密权威 X3

    【讨论】:

    • 不幸的是,Firefox 仍然抛出错误,控制台:{"name":"redbird","hostname":"my-kvm","pid":3692,"level":50,"err":{"message":"140699083372416:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher:../deps/openssl/openssl/ssl/s3_srvr.c:1418:\n","name":"Error","stack":"Error: 140699083372416:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher:../deps/openssl/openssl/ssl/s3_srvr.c:1418:\n"},"msg":"HTTPS Client Error","time":"2017-01-11T14:41:20.902Z","v":0}
    • 我使用了 Dave 提供的代码,我遇到了与 Honza 相同的问题(没有共享密码)。我通过手动创建 Redbird 配置声明要存储证书的目录来修复它。我还应该分享一下我在配置中使用了“production:false”,发现我无法在本地测试它,因为我实际上不在我的域中,一旦我将它上传到我的云 VPS,就获得了证书不受信任的 SSL我的浏览器出现错误,直到我切换到在云 VPS 上运行的“生产:true”。然后它终于奏效了。
    猜你喜欢
    • 1970-01-01
    • 2017-08-16
    • 2015-02-12
    • 2018-02-14
    • 2015-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-23
    相关资源
    最近更新 更多