2016-11-08 88 views
1

我想知道如何正確配置使用Redbird代理的安全域。基本的info有點令人困惑,因爲例子稍微分散。我想應該可以自動使用letsencrypt(如其中所述)。如何使用Redbird反向代理配置安全(HTTPS)域

我已經試過:

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: '[email protected]' 
     } 
     } 
    }); 
    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} 

火狐拋出:

Error code: SSL_ERROR_NO_CYPHER_OVERLAP

目錄SSL -certs故意爲空(看起來應該是根據該男子ual頁面),但也許我需要一些通過Redbird使用letsencrypt的重要信息。

回答

2

此示例啓用http和https到我現有的localhost:8080。

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: "[email protected]", 
     production: false 
     } 
    } 
}); 

另外,從生產切換時:假到生產:真的,我找到了證書頒發者仍然

Fake LE Intermediate X1

我完全刪除了證書目錄中的內容,並重新啓動代理找

Let's Encrypt Authority X3

+0

不幸的是,火狐仍然引發錯誤,控制檯:'{ 「名」: 「雷德伯德」, 「主機名」: 「我的KVM」, 「PID」:3692, 「級別」 50」錯誤「:{」message「:」140699083372416:錯誤:1408A0C1:SSL例程:ssl3_get_cl ient_hello:no shared cipher:../ deps/openssl/openssl/ssl/s3_srvr.c:1418:\ n「,」name「:」Error「,」stack「:」錯誤:140699083372416:錯誤:1408A0C1:SSL例程: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}' –

+0

我使用了Dave提供的代碼,並且我遇到了與Honza(沒有共享密碼)相同的問題。我通過手動創建Redbird配置表明證書將被存儲的目錄來修復它。 我也應該分享我在配置中使用「production:false」,並發現我無法在本地進行測試,因爲我實際上並不在我的域中,一旦我將其上傳到我的雲VPS,就獲得了一個證書在我的瀏覽器中出現不可信的SSL錯誤,直到我切換到運行在雲VPS上的「production:true」。然後它終於奏效了。 – Welkie