我已經建立了一個流浪漢/ VirtualBox虛擬Web服務器作爲開發沙盒,並在虛擬機配置了Apache的SSL(默認端口443上顛沛流離的沙箱訪問Apache的,具有自簽名證書)。我已經使用curl使用SSL(端口轉發)
curl -v -k https://mysite.mydomain.com/testSearch/results?postcode=WN8+0BA
測試的虛擬機本身的頁面,它似乎相當愉快工作,所以我很滿意Apache是否正確配置,並在虛擬機中運行。
然而,當我試圖從我的主機的瀏覽器通過HTTPS訪問虛擬機,我不能這樣做。
我添加
config.vm.forward_port "https", 443, 8443
我vagrantfile,但在嘗試訪問該網址
https://mysite.mydomain.com:8443/testSearch/results?postcode=WN8+0BA
根本無法顯示我已經與幾個不同的瀏覽器嘗試過的頁面:IE給一個毫無意義的「Internet Explorer無法顯示網頁」;鍍鉻給人
SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server or it may be requiring a client authentication certificate that you don't have.
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
火狐給我
An error occurred during a connection to mysite.mydomain.com:8443.
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
但即使Firebug的Net選項卡並沒有告訴我任何事情不止於此。
我沒有收到在VM Apache的訪問或錯誤日誌任何東西,所以我懷疑是流浪漢不轉發SSL可言。
- VM來賓操作系統:centos56x64
- 主持人:Windows 7的64位
- 的JRuby:1.6.3(紅寶石-1.8.7-P330)(2011-07-07 965162f)(Java的熱點( TM)64位服務器VM 1.6.0_24)[視窗7-AMD64的Java]
- 流浪:0.7.8
- VirtualBox的:4.0.12
任何援助將欣然接受。
當使用這種解決方案時,你必須做一遍又一遍的第2步和第3步,當你消滅流浪箱。使用配置(bash)腳本,Chef或Puppet將使這項任務重複得多。 –
對於谷歌來說,我不得不將'SSLCertificateFile'指定爲'.crt'文件,將'SSLCertificateKeyFile'指定爲'.key'文件。 –