我已经建立了一个vagrant/virtualbox网络服务器作为开发沙盒,并在虚拟机中配置了apache的ssl(在默认的443端口上,使用自签名证书)。我已经使用curl在虚拟机上测试了页面。
curl -v -k https://mysite.mydomain.com/testSearch/results?postcode=WN8+0BA
看起来一切都很顺利,所以我很满意apache在虚拟机中的正确配置和工作。
然而,当我尝试通过https从我的主机浏览器访问虚拟机时,我无法这样做。
我已经添加了
config.vm.forward_port "https", 443, 8443
我正在尝试访问我的Vagrantfile中的URL。
https://mysite.mydomain.com:8443/testSearch/results?postcode=WN8+0BA
无法显示页面。我已经尝试了几个不同的浏览器:IE 给出一个毫无意义的“Internet Explorer 无法显示网页”的提示;Chrome 给出
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网络选项卡,我也无法获得更多的信息。
我在虚拟机apache的访问或错误日志中没有发现任何内容,因此我怀疑vagrant根本没有转发ssl。
- VM客户操作系统:centos56x64
- 主机:Windows 7 64位
- JRuby:1.6.3(ruby-1.8.7-p330)(2011年07月07日965162f)(Java HotSpot(TM) 64-Bit Server VM 1.6.0_24)[Windows 7-amd64-java]
- Vagrant:0.7.8
- VirtualBox:4.0.12
如果有帮助,将不胜感激。
SSLCertificateFile
为.crt
文件和SSLCertificateKeyFile
为.key
文件。 - Morgan Delaney