(This SO thread似乎非常相似,但沒有回答我的問題)
我有一個偵聽 https://loadbalancerurl:443/ 的負載均衡器,它終止 SSL 并將請求轉發到埠 80 上的 IHS(IBM HTTP 服務器)。我需要將 IHS 配置為反向代理,以便將請求轉發到 http小號://目標網址:443/
瀏覽器--443-->負載均衡器--80--> IHS --443-->目標
我們需要在 IHS 上執行此操作的原因是因為在該服務器上我們可以直接快速地訪問以按需更改目標 url,而負載均衡器不在我們的控制范圍內。
這意味著,我需要在 IHS 中激活 SSL,但僅限于對 targeturl 的傳出請求,而不是傳入請求。
來自 IBM的此類頁面 或此博客文章 假定 SSL 是傳入和傳出的。
這是 httpd.conf 檔案的相關代碼塊:
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
SSLProxyEngine on
<VirtualHost *:80>
# ServerName webserverhostname # not needed so far
SSLEnable # without this i get "SSL0263W: SSL Connection attempted when SSL did not initialize."
KeyFile store.kdb # without this i get "SSL0170E: GSK could not initialize, no keyfile specified."
SSLStashFile store.sth
ProxyPass / https://targeturl/
ProxyPassReverse / https://targeturl/
</VirtualHost>
SSLDisable
其中 store.kdb 包含 targeturl 的 CA 證書,如SO 執行緒中所示
但是,服務器不斷吐出以下錯誤訊息:
SSL0227E: SSL Handshake Failed, Specified label could not be found in the key file, or the specified label is not a 'personal certificate' (no private key). Label='(null)'
據我所知,這意味著 IHS 無法處理傳入的 https 流量,這不應該發生。它不應該發生,因為它<VirtualHost *:80>指定了埠 80,而且因為任何到達 IHS 的流量都具有由負載均衡器終止的 SSL。
我誤解了錯誤資訊嗎?如果沒有,我怎樣才能讓它作業?
編輯以顯示作業解決方案:
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
SSLProxyEngine on
<VirtualHost *:80>
# ServerName webserverhostname # not needed so far
# SSLEnable # this would activate SSL for incoming traffic
KeyFile store.kdb # this contains the CA certificates of the target server
# SSLStashFile store.sth # would only be needed for incoming SSL
ProxyPass / https://targeturl/
ProxyPassReverse / https://targeturl/
</VirtualHost>
# SSLDisable
uj5u.com熱心網友回復:
SSLEnable不應出現在實際上不處理入站 SSL 的虛擬主機中。
SSLStashFile也不需要。不幸的是它被命名了。
您應該深入研究在沒有這兩個的情況下在配置中獲得的 error_log 條目。可能存在不會導致啟動失敗的早期 SSL 錯誤。即使沒有前端 SSL,唯一必要的配置也只是:
SSLProxyEngine on
ProxyPass / https://example.com/
KeyFile /path/to/key.kdb
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/533992.html
上一篇:nginx反向代理適用于埠example.com:3001但并非沒有它
下一篇:C#多執行緒之執行緒基礎篇
